Skip to content

"Console-based quiz app with categories, leaderboard, timer & color themes ๐ŸŒˆโœจ"

License

Notifications You must be signed in to change notification settings

garima57/quiz-app-pract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ Console Quiz Application

            "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.


๐Ÿ„ Features

  • 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


๐Ÿ’ก Usage

๐ŸŽฎ Run interactively:

python quiz.py

โš™๏ธ Run with command-line arguments:

python quiz.py --name "Alice" --category "Python"

When using --name and --category, the quiz starts immediately without extra prompts.


๐Ÿ“ท Screenshots

Main Banner

image

image

Screenshot 2025-04-11 233805

Screenshot 2025-04-11 233820

Screenshot 2025-04-11 233842

image

๐Ÿ“Š Score Storage

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

๐Ÿ“ File Structure

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)

๐Ÿ“œ License

This project is licensed under the MIT License. See [LICENSE](LICENSE) for more information.

๐ŸŒฑ Development

If you want to experiment or add new features:

  1. Create a new branch:
git checkout -b feature/new-mode
  1. Make your changes, commit, and push:
git add .
git commit -m "Add new game mode"
git push origin feature/new-mode
  1. Create a pull request on GitHub to merge your changes.

๐Ÿ™Œ Contributions

Ideas, suggestions, and contributions are welcome! You can fork this repo, improve features, or open issues if you find bugs.


Happy Quizzing! ๐ŸŽ‰

๐Ÿ‘ฉโ€๐Ÿ’ป Made with โค๏ธ by garima

About

"Console-based quiz app with categories, leaderboard, timer & color themes ๐ŸŒˆโœจ"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages