All Activities

Scratch: Code a Quiz Game

Scratch: Code a Quiz Game
Green highlight

Use Scratch to design and code an interactive quiz game with questions, scoring, feedback, and sprites, testing logic and storytelling skills.

Orange shooting star
Background blob
Challenge Image
Skill Badge
Table of contents

Step-by-step guide to Code a Quiz Game in Scratch

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

How to make a Quiz in scratch

What you need
Scratch account or scratch offline editor, paper, pencil, coloring materials (optional)

Step 1

Open Scratch and click "Create" to start a new project.

Step 2

Rename the default cat sprite to "Host" so it will ask the questions.

Step 3

On your paper write 5 quiz questions and for each write 4 answer choices and circle the correct choice.

Step 4

In Scratch make a variable called Score for all sprites.

Step 5

In Scratch make a variable called QuestionNumber for all sprites.

Step 6

In Scratch make a variable called CorrectAnswer for all sprites.

Step 7

Add four answer button sprites and label them A B C and D so players can click answers.

Step 8

Create broadcast messages named Q1 Q2 Q3 Q4 Q5 showChoices and GameOver.

Step 9

On the Host add a "when green flag clicked" script that sets Score to 0 sets QuestionNumber to 1 and broadcasts Q1.

Step 10

For each question add a "when I receive Q1" (and Q2 Q3 Q4 Q5) script on Host that says the question sets CorrectAnswer to the correct letter and then broadcasts showChoices.

Step 11

For each answer button add a "when this sprite clicked" script that broadcasts pickedA or pickedB or pickedC or pickedD depending on the button.

Step 12

On Host add "when I receive pickedA" (and the other picked messages) scripts that check if CorrectAnswer = "A" (or B C D) then change Score by 1 and say "Correct!" otherwise say "Oops!" then wait 1 second change QuestionNumber by 1 and if QuestionNumber ≀ 5 broadcast the next Qn else broadcast GameOver.

Step 13

Create a GameOver script that runs when it receives GameOver and shows the final Score and a friendly message like "Great job!" or "Try again!" based on the Score.

Step 14

Play your quiz from the green flag to test every question and fix any bugs or typos until it works smoothly.

Step 15

Share your finished quiz game on DIY.org.

Help!?

What can we use if we don't have a computer or can't access Scratch?

Use the Scratch Desktop offline editor or the Scratch app to build the same project, or run the activity offline by reading your paper questions aloud and letting players click real A/B/C/D cards while a person acts as the Host.

Why do my answer buttons sometimes not register clicks and how do I fix it?

Make sure each answer button sprite has a when this sprite clicked script that broadcasts the exact pickedA/pickedB/pickedC/pickedD message and that the Host has matching when I receive pickedX scripts checking the CorrectAnswer variable and that showChoices is broadcast after CorrectAnswer is set.

How can I adapt the quiz for younger kids or make it more challenging for older ones?

For younger children use only A and B buttons, 3 simple questions, and picture costumes for choices, while for older kids increase to 8–10 questions, add a timer variable that penalizes slow answers, and keep a high-score list using a Scratch list.

What are simple enhancements to personalize the game and make it more fun?

Add Host costume changes and sound effects inside each Q1–Q5 script, store questions and correct letters in lists to randomize the order before broadcasting showChoices, and customize the GameOver script to use Score to show different final messages.

Watch videos on how to code a quiz game in Scratch

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

How to make Quiz Game using Scratch | Scratch 3.0 Tutorial | Coding for kids | Make own Quiz App

4 Videos
How to make Quiz Game using Scratch | Scratch 3.0 Tutorial | Coding for kids | Make own Quiz App

How to make Quiz Game using Scratch | Scratch 3.0 Tutorial | Coding for kids | Make own Quiz App

Master the Art: Design a Quiz Game in Scratch!

Master the Art: Design a Quiz Game in Scratch!

Easy quiz game in Scratch tutorial

Easy quiz game in Scratch tutorial

Easy Guide On How to make Quiz game in Scratch

Easy Guide On How to make Quiz game in Scratch

Facts about Scratch programming for kids

🎓 Scratch was created by the MIT Media Lab’s Lifelong Kindergarten group to help kids learn coding through play.

đŸ§© Scratch uses colorful, puzzle-like blocks so code snaps together — no tricky typing errors needed!

🧠 The testing effect shows that taking quizzes helps you remember things better than just rereading them.

đŸ± In Scratch, sprites can have multiple costumes, sounds, and their own scripts to act like characters.

🏁 Use variables to track score and broadcasts to give instant feedback and control the quiz flow.

How do I create a quiz game in Scratch step-by-step?

Start by planning a set of questions, correct answers, and feedback. Open Scratch, create sprites for the host and answer buttons (or use one sprite with costumes). Make variables: score and questionIndex. Use lists or broadcasts to load each question, show choices, and wait for a click. Check the clicked answer with if/else blocks, update score, give feedback (say or play sound), then advance questionIndex and repeat. Finish with a final score screen and restart option.

What materials and tools do I need to build a Scratch quiz game?

You'll need: a computer or tablet with internet (or offline Scratch), a free Scratch account if you want to save projects, mouse or touch input, and headphones if you add sounds. Also prepare paper or a text file to write questions and correct answers, plus optional images and sound files for sprites. Adult help for younger kids is useful when signing up or downloading assets.

What ages is making a Scratch quiz game suitable for?

Scratch quiz games suit children ages about 8 and up, because they require basic reading and logical thinking. Younger kids (5–7) can try simpler versions with adult help, using picture choices and one or two questions. Older kids and teens can add complexity—variables, lists, timers, and branching stories—to deepen coding and storytelling skills. Adjust difficulty and supervision to the child’s reading and keyboard/mouse ability.

What are the benefits of building a Scratch quiz game and safety tips?

Building a Scratch quiz game improves logic, sequencing, problem-solving, and storytelling. Kids practice debugging, scorekeeping, and user feedback design. For safety, avoid collecting personal information and set project privacy to 'unshared' or review public comments with a parent. Encourage positive feedback and test answers to avoid frustration. Variations include timed quizzes, picture-based questions for younger players, or branching quizzes that change questions based on past answers.

Ready to create?

Drop Files here
Make

To create a safe space for kid creators worldwide!

Create

Vibe Coding

Kids GPT

All Tools

Kibu

Resources

Worksheets

SafeTube

Blog

FAQ

Account

Pricing

Log-in

Sign-up

Data Deletion

Company

About

Community Guidelines

Privacy Policy

Terms of Service

2025, URSOR LIMITED. All rights reserved. DIY is in no way affiliated with Minecraftℱ, Mojang, Microsoft, Robloxℱ or YouTube. LEGO¼ is a trademark of the LEGO¼ Group which does not sponsor, endorse or authorize this website or event. Made with love in San Francisco.