The latest version of Scratch includes some commands that make it easy to create quizzes.
Under Sensing there is the Ask ??? and wait command.
Also under Sensing is the answer variable, which stores the answer provided. Finally, there is a Reset timer command that can be used to set time limits on questions.
For a given question an algorithm might be:
A slightly better version is:
To make the conditions for the if statement we use an = block with the blue answer variable on the left and the correct answer on the right, for example:
![]()
We need a variable for the total score. You should be able to construct your own quiz from this point.
For some answers you may want to make use of the OR expression, or even NOT. For some answers it may be useful to allow alternative capitalisations e.g. Paris or paris might be the correct answer.
Use techniques similar to those described above to make your own quiz.