A simple True/False Quiz game built with Python, designed to practice Object-Oriented Programming (OOP), classes, objects, modules, loops, and conditional logic.
This is a command-line quiz game where the player is presented with a series of True/False questions.
The program:
- Displays questions one by one
- Takes the user's answer
- Checks whether the answer is correct
- Keeps track of the player's score
- Displays the final score at the end
python-true-false-quiz/
│
├── main.py
├── data.py
├── question_model.py
├── quiz_brain.py
└── README.md
The main entry point of the application. It creates the question bank and starts the quiz.
Contains the quiz questions and their correct answers.
Contains the Question class used to represent individual questions.
Contains the Brain class, which handles:
- Question progression
- User input
- Answer checking
- Score tracking
- Python Classes & Objects
- Object-Oriented Programming (OOP)
- Constructors (
__init__) - Methods
- Lists
- Dictionaries
- Loops
- Conditional Statements
- Modules & Imports
- User Input
- Basic State Management
Make sure Python is installed, then run:
python main.pyQ.1 : A slug's blood is green. 'True or False' :
True
Correct!
the correct answer is True.
Your current score is 1/1.
...
You've completed the quiz
Your final score was: 10/12
This project was created as a Python learning project to practice OOP and modular programming by building a small but complete application.
Built with Python 🐍