A 2-hour coding adventure to test your Python skills
Complete 5 progressively challenging exercises that test your knowledge of variables, lists, conditionals, loops, functions, and dictionaries. Each exercise requires creating a well-formatted command-line interface and solving real-world problems.
- Apply Python fundamentals in practical scenarios
- Create user-friendly command-line interfaces
- Practice problem-solving and algorithmic thinking
- Write clean, readable code
python-challenge-arena/
βββ README.md
βββ exercise_1/
β βββ student_gradebook.py
β βββ README.md
βββ exercise_2/
β βββ inventory_manager.py
β βββ README.md
βββ exercise_3/
β βββ password_analyzer.py
β βββ README.md
βββ exercise_4/
β βββ quiz_master.py
β βββ README.md
βββ exercise_5/
βββ budget_tracker.py
βββ README.md
Points: 15 | Time: 20 minutes
Create folder exercise_1/ with file student_gradebook.py
Build a gradebook that calculates student averages and determines letter grades.
- Store student data in a dictionary format:
{"name": [list_of_grades]} - Create a menu system with options:
- Add new student
- Add grade to existing student
- View student average and letter grade
- Display class statistics
- Exit
- Calculate letter grades: A(90+), B(80-89), C(70-79), D(60-69), F(<60)
- Show class average and highest/lowest performing student
- Dictionaries, lists, functions, loops, conditionals
- Menu-driven programming
- Statistical calculations
=== STUDENT GRADEBOOK MANAGER ===
1. Add Student
2. Add Grade
3. View Student Report
4. Class Statistics
5. Exit
Choice: 3
Enter student name: Alice
Alice's Average: 87.5 (Grade: B)
Grades: [85, 92, 84, 89]
Points: 20 | Time: 25 minutes
Create folder exercise_2/ with file inventory_manager.py
Manage a store inventory with stock tracking and low-stock alerts.
- Use nested dictionary:
{"item_name": {"price": float, "stock": int, "category": str}} - Menu options:
- Add new item
- Update stock (add/remove)
- Search items by category
- Check low stock items (β€5 units)
- Calculate total inventory value
- Exit
- Format currency properly ($XX.XX)
- Handle invalid inputs gracefully
- Nested dictionaries, string formatting
- Input validation, mathematical operations
- Filtering and searching algorithms
=== SMART INVENTORY MANAGER ===
Current Inventory Value: $2,847.50
β οΈ LOW STOCK ALERT:
- Laptop (2 units remaining)
- Mouse (3 units remaining)
Choose option: 3
Category to search: Electronics
Found 4 items in Electronics:
β’ Laptop - $999.99 (2 in stock)
β’ Phone - $599.99 (15 in stock)
Points: 25 | Time: 30 minutes
Create folder exercise_3/ with file password_analyzer.py
Analyze password strength and suggest improvements using multiple criteria.
- Check passwords against these criteria:
- Length (minimum 8 characters)
- Contains uppercase letters
- Contains lowercase letters
- Contains numbers
- Contains special characters (!@#$%^&*)
- Not a common password (maintain list of 20+ common passwords)
- Scoring system: Each criterion = 20 points (max 120 points)
- Strength levels: Weak(0-40), Fair(41-60), Good(61-80), Strong(81-100), Excellent(101-120)
- Generate specific improvement suggestions
- String methods, character validation
- List membership, scoring algorithms
- Complex conditional logic
=== PASSWORD SECURITY ANALYZER ===
Enter password to analyze: MyP@ss123
π SECURITY ANALYSIS RESULTS
Password: MyP@ss123
Score: 100/120 (Strong)
β
Length requirement (8+ chars)
β
Contains uppercase letters
β
Contains lowercase letters
β
Contains numbers
β
Contains special characters
β Common password detected
π‘ SUGGESTIONS:
- Avoid common password patterns
- Consider using a passphrase instead
Points: 30 | Time: 35 minutes
Create folder exercise_4/ with file quiz_master.py
Create a quiz system with multiple categories and difficulty tracking.
- Store questions in nested dictionary:
{ "category": { "easy": [{"question": "Q?", "options": ["A","B","C","D"], "answer": 0}], "hard": [...] } } - Features needed:
- Choose category and difficulty
- Track score and time per question
- Show progress bar during quiz
- Detailed results with correct answers for wrong questions
- Save high scores to continue between runs
- Include at least 3 categories with 5 questions each (easy/hard)
- Complex nested data structures
- Time tracking, progress visualization
- File handling (bonus), advanced formatting
=== QUIZ MASTER ===
Categories: Science, History, Sports
Selected: Science (Hard)
Question 2/5: What is the atomic number of Carbon?
[ββββββββββ] 40% Complete
A) 4 B) 6 C) 8 D) 12
Your answer: B
β
Correct! (+10 points)
Time: 3.2 seconds
FINAL SCORE: 80/100 (4/5 correct)
New personal best in Science!
Points: 35 | Time: 30 minutes
Create folder exercise_5/ with file budget_tracker.py
Build a comprehensive budget tracking system with analytics.
- Track income and expenses by category and date
- Data structure:
{"2024-01": {"income": {"salary": 3000}, "expenses": {"food": 400}}} - Advanced features:
- Monthly budget limits per category
- Spending trend analysis (increasing/decreasing)
- Budget variance warnings
- Visual spending breakdown (text-based charts)
- Export monthly summary
- Handle date validation and formatting
- Complex data manipulation, date handling
- Mathematical analysis, percentage calculations
- Advanced string formatting, data visualization
=== PERSONAL BUDGET TRACKER ===
Month: January 2024
π° FINANCIAL SUMMARY
Total Income: $3,200.00
Total Expenses: $2,150.00
Net Savings: $1,050.00 (32.8%)
π EXPENSE BREAKDOWN
Food ββββββββββββββββββββ $430 (20.0%)
Transport ββββββββββββββββββββ $200 (9.3%)
Housing ββββββββββββββββββββ $800 (37.2%)
β οΈ BUDGET ALERTS:
Food: $30 over budget (107% of limit)
| Exercise | Points | Difficulty | Key Skills |
|---|---|---|---|
| Exercise 1 | 15 | ββ | Dictionaries, Basic Functions |
| Exercise 2 | 20 | βββ | Nested Data, Input Validation |
| Exercise 3 | 25 | βββ | String Processing, Logic |
| Exercise 4 | 30 | ββββ | Complex Data Structures |
| Exercise 5 | 35 | βββββ | Data Analysis, Advanced Features |
Total Points: 125
- π₯ Bronze: 60-79 points - "Python Apprentice"
- π₯ Silver: 80-99 points - "Code Craftsperson"
- π₯ Gold: 100-119 points - "Python Professional"
- π Platinum: 120-125 points - "Code Master"
- File Structure: Follow the exact folder/file naming
- Code Quality: Include comments explaining complex logic
- User Experience: Ensure clean, formatted output
- Error Handling: Program shouldn't crash on invalid input
- Testing: Test all menu options and edge cases
These exercises are designed to be AI-resistant through:
- Specific formatting requirements
- Integration of multiple concepts
- Real-world problem contexts
- Custom output formatting needs
Use these challenges to genuinely test and improve your Python skills!
Good luck, and may your code be bug-free! πβ¨
This repository structure creates exercises that are:
- AI-resistant: Require specific formatting, integration of multiple concepts, and real-world problem-solving
- Progressive difficulty: Each exercise builds on previous knowledge
- Practical: Real-world applications students can relate to
- Interface-focused: Emphasis on clean, user-friendly command-line interfaces
- Time-appropriate: Designed for 2-hour completion with varying skill levels
- Engaging: Gamified with points and achievement levels
The exercises test all the concepts you mentioned while requiring students to think critically about user experience and code organization.