A collection of mini Python projects demonstrating various programming concepts and libraries.
| Project | Description | Key Concepts |
|---|---|---|
| 01-pretty-table-demo | Simple table formatting demo | PrettyTable library |
| 02-coffee-machine | OOP-based coffee vending machine | Object-Oriented Programming |
| 03-quiz-game | Interactive quiz game | OOP, data structures |
| 04-turtle-graphics-basics | Basic turtle graphics examples | Turtle graphics, loops |
| 05-hirst-painting | Damien Hirst-inspired dot painting | Turtle graphics, RGB colors |
| 06-etch-a-sketch | Interactive drawing application | Event handling, keyboard input |
| 07-turtle-race | Racing game with betting | Game logic, user input, randomization |
- Python 3.6+
- prettytable (for project 01)
- No additional dependencies for other projects (uses built-in modules)
# Clone the repository
git clone <your-repo-url>
cd python-practice-modules
# Install required dependencies
pip install -r requirements.txt
# Set up environment variables (if needed for future projects)
cp .env.example .env
# Edit .env file with your actual valuesrequirements.txt- Python dependencies for all projects.env.example- Template for environment variables (API keys, etc.).env- Your actual environment variables (not committed to git).gitignore- Excludes sensitive files from version controlSETUP.md- Detailed setup instructions
Each project has its own directory with a main.py file. Navigate to the project directory and run:
cd <project-directory>
python main.pyThese projects cover:
- Object-Oriented Programming: Classes, methods, encapsulation
- Turtle Graphics: Drawing, colors, shapes, animation
- User Interaction: Input handling, event-driven programming
- Data Structures: Lists, dictionaries, custom objects
- Game Logic: Loops, conditionals, randomization
- Code Organization: Modular design, separation of concerns
Feel free to add new mini projects or improve existing ones. Each project should be self-contained and demonstrate specific Python concepts.