A simple, customizable command-line quiz application built with Python.
This project was created as my final submission for CS50's Introduction to Programming with Python. It's an interactive quiz game that lets you test your knowledge across different categories, with the flexibility to add your own questions.
- 📚 Multiple categories of questions
- ➕ Add custom questions and categories
- 🎲 Randomized question order
- 📊 Real-time score tracking
- 💾 Persistent storage with JSON
quiz-game/
│
├── quiz.py # Main application
├── questions.json # Question database
├── test_project.py # Unit tests
├── requirements.txt # Dependencies
└── README.md # Documentation
- Python 3.x (no external libraries required)
- Clone or download this repository
- Navigate to the project directory:
cd quiz-gamepython quiz.pypytest test_project.pyThe game presents you with a simple menu:
- Play Quiz - Select a category and answer multiple-choice questions
- Add Question - Contribute your own questions to the database
- Exit - Close the application
Questions are stored in questions.json and organized by category. Your score is calculated and displayed at the end of each quiz session.
You can easily expand the quiz by:
- Adding questions through the built-in menu
- Manually editing
questions.jsonto add categories or questions - Modifying the game logic in
quiz.py
- Python standard library
- JSON for data persistence
- pytest for testing
© 2025 Deephang Thegim. All rights reserved.
This project is for educational purposes as part of CS50's Introduction to Programming with Python.
Usage Terms:
- ✅ Free to use and modify with attribution
- ✅ Educational and personal use
Created as part of CS50's Introduction to Programming with Python