A collection of four Python projects completed during the CodeAlpha Python Programming Internship. Each project targets a different domain—game development, finance, natural language processing, and automation—demonstrating practical Python skills from fundamentals through real-world integrations.
| Project | File | Purpose | Dependencies |
|---|---|---|---|
| Hangman Game | hangman.py |
Interactive console word-guessing game | None (stdlib) |
| Stock Portfolio Tracker | copy_of_stock_portfolio_tracker.py |
Real-time stock tracking with API & visualization | See requirements.txt |
| Conversational Chatbot | conversational_chatbot.py |
Rule-based chatbot powered by NLP | See requirements.txt |
| Task Automation | task_automation_with_python_scripts.py |
Automated file organization by type | None (stdlib) |
- Functions, loops, conditionals, and dictionaries
- User input handling and input validation
- Modular code structure with reusable functions
- Interactive CLI menus and game loops
- REST API integration (Alpha Vantage for stock data)
- JSON parsing and error handling
- Data manipulation with pandas
- Financial calculations (portfolio value, profit/loss)
- Plotting with matplotlib and seaborn
- Time-series visualization of stock prices
- Custom charts with labels, grids, and formatting
- Text preprocessing and tokenization with NLTK
- Named entity and linguistic analysis with spaCy
- Stop-word removal and intent-based response generation
- Dual preprocessing pipelines (NLTK vs spaCy)
- Directory creation and file traversal with
os - File moving and organization with
shutil - Extension-based classification and batch processing
A classic Hangman game played entirely in the terminal. The player guesses letters to reveal a hidden programming-related word before running out of attempts.
Features
- Random word selection from a curated word list
- ASCII art hangman stages (7 stages)
- Letter validation and duplicate-guess detection
- Win/loss detection with clear feedback
Dependencies: None — uses Python standard library only (random).
Run
python hangman.pySkills: Game logic, string manipulation, set operations, user interaction, control flow.
A portfolio management tool that fetches live stock prices and tracks investment performance. Originally built in Google Colab with progressive enhancements—from a basic tracker to a version with pre-loaded holdings and price visualization.
Features
- Add, remove, and view stocks in a portfolio
- Real-time price lookup via Alpha Vantage API
- Profit/loss calculation per holding and total portfolio value
- Stock price visualization over time (matplotlib + seaborn)
- Interactive menu-driven interface
Setup
- Install dependencies from the repo root:
pip install -r requirements.txt - Get a free API key from Alpha Vantage.
- Set your key in the script (replace the empty
API_KEYor use an environment variable).
Packages used: requests, pandas, matplotlib, seaborn (listed in requirements.txt).
Run
python copy_of_stock_portfolio_tracker.pySkills: API integration, financial data handling, data visualization, error handling, interactive CLI design.
Note: The script contains Colab-specific cells (
!pip install). For local use, install dependencies via pip and run the final menu-driven section. Avoid committing API keys to version control.
A rule-based chatbot that understands user intent through natural language preprocessing. Supports both NLTK and spaCy pipelines for text tokenization and stop-word filtering.
Features
- Greeting, farewell, help, joke, and small-talk responses
- Intent detection via keyword matching on preprocessed tokens
- Configurable preprocessing:
nltkorspacy - Continuous conversation loop until the user exits
Setup
- Install dependencies from the repo root:
pip install -r requirements.txt - Download the spaCy English model:
python -m spacy download en_core_web_sm
- NLTK data (
punkt,stopwords) is downloaded automatically when you run the script.
Packages used: nltk, spacy (listed in requirements.txt).
Run
python conversational_chatbot.pySkills: NLP fundamentals, text preprocessing, tokenization, stop-word removal, intent matching, conversational UI.
Automates sorting of files in a folder into categorized subfolders based on file extension (Images, Documents, Videos, Audio, Others).
Features
- Auto-creates category folders if missing
- Moves files by extension (
.jpg,.pdf,.mp4, etc.) - Fallback Others folder for unrecognized types
- Progress logging for each moved file
Dependencies: None — uses Python standard library only (os, shutil).
Run
python task_automation_with_python_scripts.pySkills: Scripting, filesystem operations, batch automation, path handling.
Note: The original script was written for Google Colab with Drive mounting. Update
downloads_folderto a local path (e.g.C:/Users/You/Downloads) before running locally.
| Category | Tools & Libraries |
|---|---|
| Language | Python 3 |
| NLP | NLTK, spaCy |
| Data | pandas |
| Visualization | matplotlib, seaborn |
| HTTP / APIs | requests, Alpha Vantage |
| Automation | os, shutil |
| Dependency management | requirements.txt |
| Environment | Google Colab (development), local Python (execution) |
All third-party packages are listed in requirements.txt:
| Package | Used by |
|---|---|
requests |
Stock Portfolio Tracker |
pandas |
Stock Portfolio Tracker |
matplotlib |
Stock Portfolio Tracker |
seaborn |
Stock Portfolio Tracker |
nltk |
Conversational Chatbot |
spacy |
Conversational Chatbot |
Hangman and Task Automation need no external packages — only the Python standard library.
One-time setup after pip install:
python -m spacy download en_core_web_smNLTK corpora (punkt, stopwords) download automatically when you run the chatbot.
- Python 3.8+
- pip
git clone https://github.com/<your-username>/CodeAlpha_tasks.git
cd CodeAlpha_taskspip install -r requirements.txt
python -m spacy download en_core_web_smpython hangman.py
python copy_of_stock_portfolio_tracker.py
python conversational_chatbot.py
python task_automation_with_python_scripts.pyOnly install what you need: Hangman and Task Automation run without step 2. Steps 2–3 apply to Stock Tracker and Chatbot.
CodeAlpha_tasks/
├── hangman.py # Console Hangman game
├── copy_of_stock_portfolio_tracker.py # Stock portfolio tracker + charts
├── conversational_chatbot.py # NLP chatbot (NLTK / spaCy)
├── task_automation_with_python_scripts.py # File organization automation
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Through the CodeAlpha Python Programming Internship, these projects covered:
- Python fundamentals — logic, data structures, and interactive programs
- External integrations — REST APIs and live data fetching
- Data analysis & visualization — pandas and plotting libraries
- NLP basics — preprocessing pipelines and conversational agents
- Practical automation — filesystem scripts for real-world tasks
Each project was developed and tested in Google Colab, then exported as standalone Python scripts for this repository.
Roman Ahmad Khan
CodeAlpha Python Programming Internship
This repository is for educational and portfolio purposes. Feel free to explore and learn from the code.