๐Ÿฑ My First Scratch Game ยท Episode 3 of 6 ยท See All Episodes
๐Ÿง  Episode 3 ยท Questions ยท Timer ยท High Score

Know It All!
Quiz Game

Create a 10-question quiz on any topic your child loves. Add a countdown timer, right/wrong feedback sounds and a final score screen all in Scratch!

๐Ÿ‘ถ Ages 7+ โฑ๏ธ ~1 Hour ๐Ÿฑ Scratch โœ“ Free
๐Ÿ—ฃ๏ธ User input (ask/answer) ๐Ÿ“ฆ Variables ๐Ÿ”€ Conditionals ๐Ÿ”Š Sound effects โฑ๏ธ Timer ๐Ÿ”— String joining
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 9 steps
1
๐Ÿ“
Plan Your Quiz Topic
Choose a topic and write your 10 questions before opening Scratch
Active
๐ŸŽฏ
Goal for this step

Have 10 questions with answers ready before you start building. This makes the coding part much smoother!

๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: This is a great offline step โ€” grab a piece of paper and write the questions together. Pick a topic your child loves: animals, football, Minecraft, space, dinosaursโ€ฆ anything works!

Write your questions

  • 1Choose a topic together something your child is passionate about works best.
  • 2Write 10 questions with one correct answer each. Keep answers short (one word or a small number works best).
  • 3Example: "What is the fastest land animal? (cheetah)" or "How many legs does a spider have? (8)".
  • 4Once you have 10 questions written down, open scratch.mit.edu and start a new project. Name it "[Topic] Quiz".
๐Ÿ’ก
Keep answers simple Scratch's answer detection is case-sensitive by default. Stick to one-word lowercase answers like cheetah or a number like 8.
โœ๏ธ
Fill in the Concept
+15 XP
A good quiz game needs questions with short because Scratch checks them using an text match.
๐Ÿง 
Knowledge Check
+15 XP
Why should you keep quiz answers short (one word or a number)?
ABecause Scratch can only display 5 characters
BBecause longer answers make the game slower
CBecause Scratch's answer checking is case-sensitive and exact, so shorter answers are easier to match
2
๐ŸŽจ
Set Up Backdrop & Quiz Sprite
Create a quiz host character who asks the questions
Locked
๐ŸŽฏ
Goal for this step

Add a backdrop that matches your quiz topic, and a quiz host sprite who will ask the questions.

  • 1Click the Stage and choose a backdrop that fits your theme. (Space quiz? Pick "Stars". Animals? Pick "Savanna".)
  • 2Delete the Scratch Cat. Click Choose a Sprite and pick a character who will be your quiz host. Add it to the stage.
  • 3Size it to about 80 and drag it to the left side of the stage.
  • 4This sprite will use say blocks to ask questions and give feedback.
โšก
True or False?
+15 XP
The say block is found in the Looks category (purple).
You must draw your own quiz host sprite from scratch โ€” you cannot choose one from the library.
Choosing a backdrop that matches your quiz topic makes the game feel more polished.
๐Ÿง 
Knowledge Check
+15 XP
Which block category contains the "say" blocks used by the quiz host?
ASensing (light blue)
BLooks (purple)
CEvents (yellow)
3
๐Ÿ“Š
Create Variables
Set up Score, Question Number and Timer variables
Locked
๐ŸŽฏ
Goal for this step

Create all the variables the quiz needs before writing any scripts.

  • 1Click Variables โ†’ Make a Variable. Create: Score, QuestionNumber, and TimeLeft.
  • 2Keep Score and QuestionNumber checked (visible on stage). Uncheck TimeLeft for now we'll display it differently.
  • 3You'll see the Score and QuestionNumber displays appear on the stage. Drag them to tidy positions.
โœ๏ธ
Fill in the Concept
+15 XP
In Scratch, you store data like a player's score using . To create one, click the category and then Make a Variable.
๐Ÿง 
Knowledge Check
+15 XP
How many variables did you create in this step?
A3 โ€” Score, QuestionNumber, and TimeLeft
B2 โ€” Score and QuestionNumber
C1 โ€” Score only
4
โ“
Build the First Question
Ask question 1, wait for an answer and check if it's correct
Locked
๐ŸŽฏ
Goal for this step

Build the full question-and-answer flow for question 1, then you'll copy it for questions 2โ€“10.

๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: Scratch has a built-in "ask and wait" block (in Sensing) that shows a text input box on screen and stores the player's answer in the answer variable. This is the key to the whole quiz!
  • 1Select your quiz host sprite. Drag in "when ๐Ÿณ clicked".
  • 2Add: set Score to 0, set QuestionNumber to 1.
  • 3Add Sensing โ†’ "ask [What is your first question?] and wait" replace the text with your actual Question 1.
  • 4Add an "if / else" block. For the condition: Operators โ†’ "answer = [correct answer]".
  • 5In the if branch: say [โœ… Correct!] for 1 second โ†’ change Score by 1.
  • 6In the else branch: say (join [โŒ Wrong! The answer was ] [correct answer]) for 2 seconds.
  • 7After the if/else: change QuestionNumber by 1.
๐Ÿง  Quiz Host โ€” Question 1 pattern
when ๐Ÿณ clicked set [Score] to (0) set [QuestionNumber] to (1) ask [What is the fastest land animal?] and wait if (answer) = [cheetah] then say [โœ… Correct!] for (1) seconds change [Score] by (1) else say (join [โŒ Wrong! The answer was ] [cheetah]) for (2) seconds end change [QuestionNumber] by (1)
๐Ÿ’ก
Test it now with the Green Flag! Type your answer in the text box that appears. Make sure correct and incorrect both work before moving on.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to ask a question and check if the answer is correct:
[What is the fastest land animal?] and wait if (answer) = [] then change [Score] by () end
๐Ÿ’ก Hint: Use the "ask" block from Sensing. The answer must match exactly. Score goes up by 1 for each correct answer.
๐Ÿ”ข
Order the Steps
+15 XP
Click the steps in the correct order to build one quiz question:
Add an if/else block to check if the answer is correct
Set Score to 0 and QuestionNumber to 1
Change QuestionNumber by 1 to move to the next question
Use ask and wait to show the question
๐Ÿง 
Knowledge Check
+15 XP
Which block category contains the "ask and wait" block?
ALooks (purple)
BSensing (light blue)
COperators (green)
5
๐Ÿ”ข
Add All 10 Questions
Repeat the question pattern 9 more times with your other questions
Locked
๐ŸŽฏ
Goal for this step

Add all 10 questions by repeating the same ask / if-else / change QuestionNumber pattern.

  • 1Beneath question 1 in the same script, add ask [Question 2] and wait โ€” fill in your second question.
  • 2Add the same if answer = correct else wrong blocks, changing the question text and correct answer.
  • 3Add change QuestionNumber by 1 again at the end.
  • 4Repeat for all 10 questions. You can right-click on a block group and Duplicate it to save time โ€” then just change the question text and answer.
๐Ÿ’ก
Right-click the ask block + its if/else group and choose Duplicate. Then just change the question and answer text in each copy much faster than building from scratch each time!
โšก
True or False?
+15 XP
Right-clicking a block group and choosing Duplicate copies all the blocks underneath it too.
After duplicating a question block, you need to change both the question text and the correct answer.
Each quiz question needs its own separate sprite.
๐Ÿง 
Knowledge Check
+15 XP
What is the fastest way to add all 10 questions in Scratch?
ACreate 10 separate sprites, one for each question
BBuild each question from scratch using new blocks every time
CRight-click and Duplicate the question block group, then change the text and answer
6
โฑ๏ธ
Add a Countdown Timer
Give players 15 seconds per question to answer
Locked
๐ŸŽฏ
Goal for this step

Run a timer alongside each question. If it reaches 0, mark the question as wrong and move on.

๐Ÿ‘จโ€๐Ÿ‘ง
Parent note: The timer runs in a separate script stack that resets before each ask block. We use a broadcast message to tell the timer when a new question starts. This is the trickiest step take it slowly!
  • 1Create a new sprite (paint a simple rectangle) called TimerBar. Give it a bright colour. Position it at the top of the stage, wide and short.
  • 2Check the TimeLeft variable on stage (tick it in Variables panel). Drag it to sit near the timer bar.
  • 3Before each ask block in your quiz script, add: set TimeLeft to 15.
  • 4In the TimerBar sprite, add a separate script: "when ๐Ÿณ clicked โ†’ forever โ†’ if TimeLeft > 0 then wait 1 second โ†’ change TimeLeft by -1 โ†’ end".
  • 5In the TimerBar sprite, add: "forever โ†’ set size to (TimeLeft ร— 6) %" so the bar shrinks as time runs out.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to build the timer countdown script for the TimerBar sprite:
when ๐Ÿณ clicked forever if (TimeLeft) > () then wait () seconds change [TimeLeft] by () end end
๐Ÿ’ก Hint: The timer counts down by 1 each second, only while TimeLeft is greater than 0.
๐Ÿ”ฎ
Predict What Happens
+15 XP
Scenario: You set TimeLeft to 15 before each question, but the timer script uses "change TimeLeft by -1" and "wait 1 second" inside a forever loop. What happens if a player answers the question in 3 seconds?
AThe timer stops at 12 and stays there forever
BThe timer keeps counting down to 0 because it runs in a separate script, but the quiz moves on to the next question
CThe game crashes because two scripts can't run at the same time
๐Ÿง 
Knowledge Check
+15 XP
Why does the timer run in a separate script on a different sprite?
ABecause Scratch only allows one script per sprite
BBecause the timer bar needs its own costume
CSo the timer can count down at the same time as the quiz waits for an answer
7
๐Ÿ”Š
Add Sound Effects
Play a fanfare for correct answers and a buzz for wrong ones
Locked
๐ŸŽฏ
Goal for this step

Add satisfying sounds when players get answers right or wrong.

  • 1Click your quiz host sprite. Click the Sounds tab at the top.
  • 2Click Choose a Sound (speaker icon). Search for "Cheer" or "Trumpet" add it as your correct-answer sound.
  • 3Search for "Buzz Whir" or "Lose" โ€” add it as your wrong-answer sound.
  • 4Go back to the Code tab. In every correct if-branch, add Sound โ†’ "play sound [Cheer] until done".
  • 5In every wrong else-branch, add "play sound [Buzz Whir] until done".
๐ŸŽ‰
Test a few questions the sounds make getting answers right feel so much better!
โœ๏ธ
Fill in the Concept
+15 XP
To add sounds in Scratch, click the tab at the top of the editor. Then use the play sound block from the category to trigger it in your code.
โšก
True or False?
+15 XP
You can add different sounds for correct and incorrect answers to make the quiz more fun.
You add sounds to a sprite by going to the Variables tab.
The "play sound until done" block waits for the sound to finish before running the next block.
๐Ÿง 
Knowledge Check
+15 XP
Where do you add new sounds to a sprite in Scratch?
AIn the Variables panel
BIn the Sounds tab at the top of the editor
CBy right-clicking the stage
8
๐Ÿ†
Add the Results Screen
Show the final score and a message after all 10 questions
Locked
๐ŸŽฏ
Goal for this step

At the end of all 10 questions, show the player their score and a personalised message.

  • 1After question 10's if/else block, add: say (join [Quiz Over! You scored ] (join (Score) [ out of 10!])) for 5 seconds.
  • 2Add extra messages based on score. Use "if Score = 10 then say [Perfect Score! Amazing! ๐ŸŒŸ] for 3 seconds".
  • 3Add another: "if Score โ‰ฅ 7 then say [Great job! ๐ŸŽ‰] for 3 seconds".
  • 4And: "if Score < 5 then say [Keep practising! ๐Ÿ’ช] for 3 seconds".
  • 5End with Control โ†’ "stop all".
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to show the final score and end the game:
say ( [Quiz Over! You scored ] (Score)) for (5) seconds if (Score) = () then say [Perfect Score! Amazing!] for (3) seconds end stop []
๐Ÿ’ก Hint: Use the "join" operator to combine text with the Score variable. A perfect score is 10 out of 10. "stop" needs to stop everything.
๐Ÿ”ฎ
Predict What Happens
+15 XP
Scenario: A player finishes all 10 questions and got 6 correct. Your code says: "if Score = 10 then say Perfect! ... if Score >= 7 then say Great job! ... if Score < 5 then say Keep practising!". What message does the player see?
AGreat job!
BKeep practising!
CNone of those messages โ€” 6 doesn't match any condition
๐Ÿง 
Knowledge Check
+15 XP
What does the "join" block (in Operators) do?
AIt combines two pieces of text into one โ€” like gluing words together
BIt adds two numbers together
CIt connects two sprites so they move together
9
๐ŸŒ
Test & Share!
Play through all 10 questions and publish your quiz
Locked
๐ŸŽฏ
Goal for this step

Play your quiz all the way through, fix any issues, and share it so friends can test themselves!

  • 1Press the Green Flag and answer all 10 questions.
  • 2Check: does the score count up correctly? Does the timer reset each question? Do sounds play?
  • 3If any answers aren't being detected, check the spelling answers are case-sensitive. "Cheetah" won't match "cheetah"!
  • 4Click File โ†’ Save now then Share. Send the link to family and challenge them to beat your score!
๐ŸŽ‰
The best part about a quiz game is playing it with others. Can Mum or Dad beat you on your own quiz?
๐Ÿ”ข
Order the Steps
+15 XP
Put these final testing and sharing steps in the correct order:
Fix any spelling mistakes in answers (remember: case-sensitive!)
Press the Green Flag and play through all 10 questions
Click Share and send the link to friends and family
Check that the score, timer and sounds all work correctly
๐Ÿง 
Final Knowledge Check
+15 XP
A player types "Cheetah" but the correct answer is set to "cheetah". Will Scratch count it as correct?
AYes โ€” Scratch ignores capitalisation
BNo โ€” Scratch's = block is case-sensitive, so "Cheetah" does not equal "cheetah"
CIt depends on the browser you're using
๐ŸŽ‰๐Ÿง โญ๐ŸŽŠ๐Ÿ†
You Built a Quiz Game!

Fantastic 10 questions, a timer, sounds and a results screen. Now challenge your family and see who's the real expert!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐ŸŒ€ Episode 4: Maze Game โ†’ โญ View My Progress & Certificates

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi