In this workshop, participants will learn how to create their own online quiz using the Scratch programming tool. This quiz will be designed with multiple-choice answers so that users can simply click on the displayed answers to choose the right one.

Target group
School drop outs, Students (primary school), Students (secondary school)
Age group
Children, Teenagers
Proficiency level i
Level 2
Format
Activity sheet
Copyright i
Creative Commons (BY-SA)
Language
English, French , Français

General Objective

Knowledge acquisition, Testing

Preparation time for facilitator

less than 1 hour

Competence area

3 - Digital content creation

Time needed to complete activity (for learner)

0 - 1 hour

Name of author

Dan Beltran

Support material needed for training

Computer with Scratch or internet connection

Resource originally created in

French
Workshop directions

Introduction

The goal of this tutorial is to create a quiz involving multiple questions and answers. These will appear on the screen and the player will have to click the button corresponding to the right answer.

Choosing a backdrop

We will first create a backdrop. Choose the backdrop in the bottom right of the creation screen.

Making the questions

To make a question, create a new sprite by hovering over the icon near the bottom right of the screen and then clicking on ‘Paint’.

The question will be one of the sprite’s costumes. Under the ‘costumes’ tab, click the T icon to add text. Then write a question and three possible responses (only one should be correct). Name the costume ‘Question 1’.

 

Add as many questions as you want by adding more costumes to the same sprite. To do this, stay under the ‘Costumes’ tab and go to the icon on the bottom left.

As before, write a question using the text tool and rename the costume.

Now you need to create two costumes – ‘true’ and ‘false’ – this time by using coloured text (so that true and false are different colours). In this example, the questions are black, true is green and false is red.

Animating the first question

Click on the sprite. Under the ‘Code’ tab, copy the below blocks. These will start the game with the right question and will stay there until someone chooses a, b or c.     Code explanation: when the green flag is clicked, the sprite changes to the costume ‘Question 1’ and so the first question appears. The script stops until the player press a, b or c on the keyboard. Now the connection needs to be made between the key pressed and the right answer. Add the following blocks:  

Code explanation: if the player press ‘a’ (the right answer in this example), the costume changes to ‘true’ and stays in this state for 1 second. If the player chooses either of the other 2 possibilities, the script changes the costume to ‘false’ and waits 1 second. Integrate the code you have written so far to finish the first question.

Animating the second question

The code for the second question is identical to that of the first, except that this time the correct answer is b. The blocks to be used are as follows: Add these the previous code and add the extra blocks so the second question is displayed, as follows:   Code explanation: after waiting 1 second, the computer will display the second question. It will wait for the player to choose 1, 2, or 3.

Going further

Some tips to improve the game:

  • Choose a theme and think about the kinds of questions to include
  • Add a point count which increases when the right answer is given
  • Find a way to indicate the correct response when the wrong one is given before moving on to the next question
  • Display a question count so the player knows how far they have progressed
  • With an audience familiar with Scratch, challenge them to improve the code used for the example. Here are a few hints: avoid block repetitions, execute the costume-related actions more efficiently, use messages.