python · level 1 check
a tiny quiz game.
Time to build a real game! Your quiz asks three questions, one after another. It checks each answer, keeps score, and tells the player how they did at the end.
The questions and answers live in two lists, side by side. The function `ask` asks one question and returns `True` if the answer is right, or `False` if not. A loop with `range` uses an index to grab each question and its matching answer.
Be kind to your player: `PARIS`, `paris` and `Paris` with extra spaces should all count as right. Fill in each `____`, run it, then play your own quiz.
Fill in every ____ then run the checks.
- 1 It asks every questionuses: loops
- 2 It accepts any capitalsuses: text tricks
- 3 It ignores extra spacesuses: text tricks
- 4 It counts the score correctly when some answers are wronguses: variables
- 5 It prints the final score in a sentenceuses: f-strings
Take as long as you like and try as many times as you want.
python · level 1 · easy
level up.
You passed every check. Your face is now :D, and Level 2 gets you B).
- 28 lessons in this level
- 5 of 5 checks passed
This pass isn’t saved. A free account keeps your new face.