Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Python True/False Quiz

A simple True/False Quiz game built with Python, designed to practice Object-Oriented Programming (OOP), classes, objects, modules, loops, and conditional logic.

🎮 About the Project

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

📁 Project Structure

python-true-false-quiz/
│
├── main.py
├── data.py
├── question_model.py
├── quiz_brain.py
└── README.md

main.py

The main entry point of the application. It creates the question bank and starts the quiz.

data.py

Contains the quiz questions and their correct answers.

question_model.py

Contains the Question class used to represent individual questions.

quiz_brain.py

Contains the Brain class, which handles:

  • Question progression
  • User input
  • Answer checking
  • Score tracking

🧩 Concepts Practiced

  • Python Classes & Objects
  • Object-Oriented Programming (OOP)
  • Constructors (__init__)
  • Methods
  • Lists
  • Dictionaries
  • Loops
  • Conditional Statements
  • Modules & Imports
  • User Input
  • Basic State Management

▶️ How to Run

Make sure Python is installed, then run:

python main.py

🖥️ Example

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

📚 Purpose

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 🐍

Releases

Packages

Contributors