A comprehensive collection of Python exercises organized by topic and difficulty level. Perfect for learning Python from basics to advanced concepts.
Introduction to Python programming fundamentals.
- 01 - Basic IO.py - Input and output operations
- 02 - Sum numbers.py - Basic arithmetic operations
- 04 - Variables.py - Variable declaration and usage
- 06 - Swap variables.py - Variable swapping techniques
Mathematical operations and calculations.
- 03 - Triangle area.py - Calculate triangle area
- 05 - Division.py - Division operations
- 07 - Birthday calculator.py - Date calculations
- 09 - Perfect square.py - Perfect square checker
String manipulation and algorithms.
- 13 - Palindrome strings.py - Check if string is palindrome
- 14 - String concatenation.py - String joining operations
- 15 - Simple ROT.py - Basic ROT cipher (Caesar cipher)
- 15a - Complete ROT.py - Advanced ROT cipher implementation
- 16 - String merge.py - Merge multiple strings
Working with random numbers and list operations.
- 10 - Heads or tails.py - Coin flip simulation
- 11 - Average of random numbers in list.py - Calculate average of random numbers
Small practical projects combining multiple concepts.
- 08 - Basic Calc.py - Simple calculator with basic operations
- 12 - Password generator.py - Random password generator
- 17 - The Love Game.py - Fun love compatibility calculator
File input/output operations.
- 22 - Reverse file lines/ - Read and reverse file contents
Data processing and analysis exercises.
- 23 - Student grades analysis/ - Analyze student grades data
Complete game projects with complex logic.
- 18 - Hangman/ - Classic word guessing game
- 19 - Black Jack/ - Card game implementation
- 20 - Higher Lower/ - Number guessing game
- 21 - Coffee Machine/ - Coffee machine simulator
Graphics programming with Python Turtle.
- 24 - Draw a house.py - Draw geometric shapes
- 25 - Spiral.py - Create spiral patterns
- 26 - Random squares.py - Generate random square patterns
- 27 - Point wall.py - Interactive point-based drawing
- 28 - Turtle race.py - Turtle racing animation
- 29 - Turtle race questions.py - Interactive quiz-based turtle race
- Python 3.x installed
- For Turtle graphics: Tkinter (usually included with Python)
# Navigate to the desired category
cd 01-fundamentals-basics
# Run any exercise
python3 "01 - Basic IO.py"Recommended order for beginners:
- Start with 01-fundamentals-basics
- Progress to 02-mathematics
- Learn string manipulation in 03-strings
- Explore randomness in 04-random-and-lists
- Build confidence with 05-mini-projects
- Master file operations in 06-file-io
- Analyze data in 07-data-analysis
- Challenge yourself with 08-games
- Have fun with 09-turtle-graphics
- Beginner: Categories 1-4
- Intermediate: Categories 5-7
- Advanced: Categories 8-9
- All exercises include comments explaining the logic
- Some exercises use external files (check subdirectories)
- Games may require additional modules or data files
Feel free to add new exercises or improve existing ones following the established structure.
Educational purposes - Free to use and modify.
Happy Coding! 💻✨