A lightweight terminal-based quiz game built with Python! π
β
Loads questions from a JSON file
β
Displays multiple-choice questions
β
Validates user input and prevents errors
β
Checks answers and calculates score
β
Shows final results with a success percentage
Create a quizs.json file with questions like this:
[
{
"question": "What type of language is Python?",
"options": ["Compiled", "Interpreted", "Machine", "All of the above"],
"correct_answer": 2
}
]-
Make sure Python is installed on your system.
-
Place your questions inside
quizs.json. -
Run the script using:
python main.py
