Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Python Learning Game

An interactive terminal-based game that helps beginners learn Python programming through progressive coding challenges.

How to Run

python3 python_learning_game.py

How to Play

  1. Start the game - Run the Python script
  2. Read the task - Each level presents a coding challenge
  3. Write your code - Type your Python solution and press Enter
  4. Get feedback - The game checks your answer and provides immediate feedback
  5. Progress through levels - Complete tasks to advance through 5 difficulty levels

Commands

  • quit - Exit the game
  • hint - Get a helpful hint for the current task
  • skip - Skip the current task and move to the next one

Game Features

Progressive Difficulty

  • Level 1: Basic arithmetic operations
  • Level 2: Variables and strings
  • Level 3: Lists and basic operations
  • Level 4: Conditionals and comparisons
  • Level 5: Functions

Scoring System

  • 10 points for each correct answer
  • Complete 3 correct answers to level up
  • Track your progress throughout the game

Answer Validation

The game executes your code and checks the output:

  • Correct: "You are right! Well done! 🎉"
  • Incorrect: Shows the correct solution

Example Gameplay

🎮 Welcome to Python Learning Game! 🎮

📚 Level 1
🎯 Task: Write code to add 2 to 2

💡 Write your Python code below (multiple lines OK):
>>> print(2 + 2)

✅ You are right! Well done! 🎉
📊 Score: 10

Educational Benefits

  • Hands-on learning: Write real Python code
  • Immediate feedback: Know instantly if your solution works
  • Progressive complexity: Build skills step by step
  • Safe environment: No risk of breaking anything
  • Self-paced: Learn at your own speed

Requirements

  • Python 3.x
  • Terminal/command line access

Tips for Success

  1. Start simple: Begin with the most straightforward solution
  2. Use hints if stuck - they provide useful guidance
  3. Read the task carefully - Make sure you understand what's being asked
  4. Practice regularly - Consistency helps reinforce learning
  5. Don't worry about mistakes - They're part of the learning process!

Happy coding! 🐍✨

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages