Python Programming Project
This repository contains my Python programming projects completed as part of the CodeAlpha Python Programming Internship.
The projects focus on building practical console-based applications while strengthening my understanding of Python fundamentals such as functions, loops, conditions, lists, dictionaries, user input, file handling, and the random and csv modules.
A simple text-based word guessing game where the player tries to guess a randomly selected word one letter at a time.
- The game randomly selects a word from a predefined list.
- The hidden word is displayed using underscores.
- The player guesses one letter at a time.
- Correct guesses reveal the letters in the word.
- Incorrect guesses increase the number of wrong attempts.
- The player is allowed a maximum of 6 incorrect guesses.
- The game ends when the player guesses the word or runs out of attempts.
- Players can choose to play multiple rounds.
randommodule- Functions
- Lists
- Strings
whileloopsif-elsestatements- Input validation
- User interaction
python
hangman
developer
internship
programming
A console-based application that allows users to enter the stocks they own and calculate the total value of their portfolio based on predefined stock prices.
The program displays a list of available stocks and their prices.
The user enters stock symbols and the quantities they own.
The program calculates the value of each stock.
The total portfolio investment is calculated.
A summary of the portfolio is displayed.
The user can save the results as either:
- A
.txtfile - A
.csvfile
- A
| Stock | Price |
|---|---|
| AAPL | $180 |
| TSLA | $250 |
| GOOGL | $140 |
| AMZN | $175 |
| MSFT | $420 |
| META | $480 |
- Dictionaries
- Functions
- Loops
- Conditional statements
- Input validation
- Exception handling
- File handling
- CSV file writing
- Basic calculations
- Python 3
- Python Standard Library
randommodulecsvmodule
No external libraries are required to run these projects.
Make sure Python 3 is installed on your computer.
Check your Python version:
python --versionDownload the project files to your computer.
python hangman.pypython stock_portfolio.pyThe filenames may be different depending on how the files are saved.
CodeAlpha-Python-Internship/
│
├── Task-1-Hangman/
│ └── hangman.py
│
├── Task-2-Stock-Portfolio/
│ └── stock_portfolio.py
│
└── README.md
- Add difficulty levels
- Add more words
- Add hints
- Add categories
- Create a graphical user interface
- Add score tracking
- Add more stocks
- Use live stock prices through an API
- Add support for multiple portfolios
- Add profit and loss tracking
- Create charts and graphs
- Build a graphical user interface
Through these projects, I practiced turning basic Python concepts into functional applications.
These projects helped me improve my understanding of:
- Writing and organizing functions
- Working with lists and dictionaries
- Using loops and conditions
- Validating user input
- Handling errors with
try-except - Working with files
- Saving data in CSV format
- Building interactive command-line programs
Program: CodeAlpha Python Programming Internship Tasks:
- Task 1: Hangman Game
- Task 2: Stock Portfolio Tracker
Programming Language: Python
These projects represent my progress in learning Python programming and applying fundamental programming concepts to practical projects.