"Console-based quiz app with categories, leaderboard, timer & color themes ๐โจ"
An interactive command-line quiz game built with Python! Test your knowledge in different categories like Python and General Knowledge.
- Multiple choice questions (MCQs)
- โฑ Timed input with countdown
inputimeout - ๐ Colorful console design using
colorama - โ Feedback on correct/incorrect answers
- ๐ File handling to persist scores and leaderboard
- ๐ Leaderboard storing top scores per category ๐ง Multiple categories: Python & General Knowledge
- ๐ง Command-line support using
argparse(CLI) - Highlights player name on leaderboard if in top 3
python quiz.pypython quiz.py --name "Alice" --category "Python"When using
--nameand--category, the quiz starts immediately without extra prompts.
All scores are saved to scores.txt after each quiz attempt.
To see how the format works without affecting actual data, refer to:
๐ scores_preview.txt
To use it, rename to `scores.txt` locally. It is `.gitignored` to avoid uploading real user data
quiz-app-pract/
โโโ quiz.py # Main Python file
โโโ scores.txt # Persistent leaderboard data ----- #ignored
โโโ python_questions.txt # Category: Python
โโโ general_knowledge_questions.txt # Category: GK
โโโ .gitignore
โโโ README.md
โโโ requirements.txt # List of dependencies (optional)This project is licensed under the MIT License. See [LICENSE](LICENSE) for more information.
If you want to experiment or add new features:
- Create a new branch:
git checkout -b feature/new-mode- Make your changes, commit, and push:
git add .
git commit -m "Add new game mode"
git push origin feature/new-mode- Create a pull request on GitHub to merge your changes.
Ideas, suggestions, and contributions are welcome! You can fork this repo, improve features, or open issues if you find bugs.
Happy Quizzing! ๐





