You’re going to start by creating random questions that the player has to answer.
Open a new Scratch project.
Online: open a new online Scratch project at scratch-new.
Add a character sprite and a backdrop for your game. You can choose any you like! Here’s an example:
Make sure you have your character sprite selected. Create two new variables, called number 1
and
, to store the numbers for the quiz questions.number 2
Add code to your character sprite to set both of the variables
to a random
number between 2 and 12.
Add code to ask
the player for the answer, and then say for 2 seconds
whether the answer was right or wrong:
Test your project twice: answer one question correctly, and the other incorrectly.
Add a forever
loop around this code, so that the game asks the player lots of questions in a row.