A Python-based quiz game designed to help users practice machine learning interview questions in a fun, interactive way using Pygame.
The ML Interview Quiz Game is a multiple-level quiz game where players answer questions about machine learning topics. The game tracks your score and health, provides immediate feedback, and progresses through multiple levels of different topics.
The game uses Pygame for graphics, interactive buttons, and smooth animations.
- Multiple levels with unique questions
- Interactive buttons
- Health bar to track performance
- Score tracking per session
- Level transition animations and feedback messages
- Game over screen with restart option
- Clone the repository:
git clone git@github.com:AlexanderDsouza/MLGame.git
cd MLGame- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
- Install required packages:
pip install pygame- Add quiz data and images:
Make sure you have a quiz_data.json file containing quiz questions. Add level images as level1.png, level2.png, etc., in the project folder.
Run the game:
python main.pyThe game starts at Level 1.
Answer questions by clicking on buttons or pressing 1–4 on your keyboard.
Feedback is shown immediately after each answer.
Health decreases on correct answers and increases on wrong answers in a fun twist!
Progress through levels until all questions are answered or the game ends.
