A console-based quiz system built in Python using object-oriented programming principles. Users can test their knowledge across multiple topics, track their performance over time, and compare scores with other players.
- Multi-topic quizzes: Choose from Sport, History, Geography, or Science
- Customisable quiz length: Select how many questions you want to answer (up to 20 per topic)
- Randomised questions: Questions appear in a different order each time
- User profiles: Returning users are recognised and their history is tracked
- Performance tracking: View your highest, lowest, and average scores
- Detailed feedback: See which questions you got right and wrong with correct answers shown
- Persistent data: User scores and attempts are saved between sessions
- Leaderboard: Final rankings show all players sorted by their best score
- Input validation: Handles empty inputs and invalid entries gracefully
- Run
system.pyin your Python environment - Enter your username when prompted (returning users will see their previous stats)
- Select a topic by entering the corresponding number (1-4)
- Choose how many questions you would like to answer
- Answer each question by typing your response and pressing Enter
- After completing the quiz, view your detailed results showing correct and incorrect answers
- View your personal statistics (highest, lowest, average scores)
- Choose whether another player wants to take the quiz
- When all players have finished, the final leaderboard displays all users ranked by best score
- All data is automatically saved for next time
system.py- Main entry point and game loopquiz.py- Quiz class handling question management and quiz logicquestion.py- Question class representing individual questionsuser.py- User class and data persistence functionsquestions.csv- Question bank (80 questions across 4 topics)user_data.csv- Stores user attempt history (generated on first run)
- Python 3.x
- No external dependencies (uses standard library only)
- Flask web wrapper & Interactive Frontend
- Use scikit-learn for ML score projections/comparisons
- Add new topics and questions
- Other 3rd party libraries
- Multiple choice question format
- Timed quiz mode
- Difficulty levels per question