How to play the Math Quiz Game?
A character in the game will ask Math Questions. The player needs to answer the question . With each correct answer, a point is awarded and a point is deducted if the answer is wrong.
Steps to create the Quiz Game inScratch Programming
Step 1: Create the background
Click on choose a backdrop option at the bottom right corner and then choose the blue sky backdrop.
Step 2: Create the sprite
Click on choose a sprite option and choose a character as shown below.
Click on choose a sprite option and choose a button which will be the next question button.
Every time next button is clicked, the game displays the next question.
Add text on the button saying next
Step 3: Creating variables for the game.
Score variable to store the points scored by the player.
Num1 variable to store the first number in the question
Num2 variable to store the second number in the question
The initial value of the score variable is 0.
The initial value of the num1 and num2 variable is any random number between 1 to 10.
Step 4: Create the question and display in the game
Sample output:
Step 5: Every time the next button is clicked, new question is displayed.
Add this code to the button sprite
Check is the function that needs to be called.
Step 6: Check if the answer entered is right
Answer is the response entered by the user.
Correct answer is num1 + num2, the variables which store the numbers randomly generated by the computer.
If both are equal, then a point is scored otherwise a point is deducted.
Add this code to the rooster sprite after the code shown below.
Hope this is useful, thank you.
You may like to read: Is Primary Math Tuition Necessary?, Scratch Coding Quiz, Programming Tic-Tac-Toe in Java, and Coding Basketball Game in Scratch