← All projects

Beginner project · about 40 minutes

Quiz Game Engine ❓

A data-driven quiz that loads questions from JSON, asks them, scores answers and prints a report card.

Separating data (questions) from logic (the engine) is the first architecture lesson. Answers come through the input box, one per line.

What you will build

  1. Load questions json.loads the QUESTIONS string into a list of dicts with "q", "options" and "answer".
  2. Ask each one Print the question and lettered options (A, B, C). Read the answer with input(), upper-cased and stripped.
  3. Score Compare to the answer letter; print "Correct!" or "Wrong, it was B". Track the score.
  4. Report card Print score out of total and a percentage. 100% gets "Perfect!"

Skills: json, input, loops, functions