Part 2: Opening Scene & Score
1. Add the When Green Flag Clicked block and use the Go To X () Y () block to position your sprite
2. In the Variables menu, create a variable called Score and uncheck the variable so it does not appear on screen.
3. Use the Set () to () block to set the Score variable to 0.
4. Using as many Say () for () Seconds blocks as needed, provide information that the player needs to know at the start
of the game, including but not limited to:
a. Introduce the sprite as the host
b. Explain the goal of the game
c. Explain how the player will be presented questions and be able to answer them
5. Finally, add a Say () block and instruct the player to press the space bar to begin the game.
6. Use a Wait Until () block and drag a Key () Pressed? block from the blue Sensing menu into the empty space of the
Wait Until () block. Set it to the Space key.
7. Finally, add a Switch Backdrop To () block and set it to switch to the background that represents your first question.
Part 3: Setting Up Question 1
1. Add the When Backdrop Switches To () event block and set it to match your background that represents your first
question.
2. Use the Go To X () Y () block to reposition your sprite, if necessary.
3. Use the Ask () And Wait block from the blue Sensing menu to ask the question that the player is expected to answer.
The answer options should be shown as part of your background.
4. Drag out an If () Then, Else block add a () = () block from the green Operators menu to the black space of the If ()
Then, Else block.
5. In the first blank space of the () = () block, add the Answer block from the blue Sensing menu. In the second blank
space, add the letter that matches the correct answer for your quiz question.
6. The If Then section of the If () Then, Else block will run if the player inputs the correct answer. In this section, add:
a. A Change () By () block from the orange Variables menu. Set it to match the Score variable and to increase
by 1.
b. Use a Say () for () Seconds block to display a message to the player showing that they selected the correct
answer.
7. The Else section of the If () Then, Else block will run if the player inputs the incorrect answer. In this section, just
add a Say () for () Seconds block to display a message to the player showing that they selected the incorrect answer.
8. Finally, outside of the If () Then, Else block add a Switch Backdrop To () block and set it to the background for your
second question.
Part 4: Setting Up Additional Questions
1. Repeat the steps in Part 3 for all subsequent questions, using a new When Backdrop Switches To () event block to
trigger the code for that question and the final Switch Backdrop To () block being changed to move on to the
following question. Make sure that the Answer = () operator aligns with the correct answer.
2. To save time, you can right click on a section of code and select Duplicate in order to make an exact copy of code
that has already been written.
Part 5: Ending the Quiz Game
1. In the line of code for the final quiz question, ensure that the Switch Backdrop To () block is set up to change to the
background you created for your end game screen.
2. Use a When Backdrop Switches To () event block to trigger the end game screen.
3. Reposition your sprite using the Go To X () Y () block if necessary and add a Say () block.
4. Add a Join () () block from the green Operators menu to the blank space of the Say () block
5. In the first blank space of the Join () () block, write the beginning of a message that will tell the player what their
final score was (do not include any number for the score).
6. In the second blank space of the Join () () block, drag the round Score block that was created in Part 2 from the
orange Variables menu. This will ensure that the score displayed to the user represents the actual number of
questions they got correct and will change each time the game is played, depending on the player’s performance.