Project 3: Quiz
Teachers use Kahoot; you’ll write your own. Questions and answers live in lists, a loop asks them one by one, and a correct answer earns a point.
- Make two parallel lists:
questionsandanswers— the question and its answer share the same index score = 0for i in range(len(questions)):— for each question:- show the question:
input(questions[i]) - if the answer equals
answers[i]: “Correct! ✅” + a point - if not: “Wrong ❌”
- show the question:
- At the end:
f"Result: {score}/{len(questions)}"
Mission
Section titled “Mission”Quiz
+25 XP ✓ CompletedFollow the plan and run the quiz. (The player’s answers are in the inputs: Baku ✅, eight ❌ — the program expects 8! — and square ✅. The result should be 2/3.) Then swap in questions from your own subject!
Inputs (for input())
One value per line — read in order by input().
Output
Last project: secret messages — write your own cipher. 🕵️ Continue →