Quiz Game

Learning Objective:  Write a program that collects user responses to different prompts, uses Boolean operators to take different actions if the response is correct or not, accumulates a summary evaluation score, and provides feedback on user performance.

SLE: Think critically and solve problems

Assignment Requirements

Make a game where the goal is to correctly answer a series of multiple-choice questions.  Provide feedback and keep a score of the number of correct answers.  At the end, summarize the player’s performance.

Choose questions which reflect your interests.  Use your imagination to come up with encouraging messages for the player when they answer a question correctly.  Use animations, custom sprites, and sound effects to make your game more interesting and engaging.

Things you need to be aware of

Use multiple choice a, b, c, d answers to keep it simple.

Display questions and possible answers as sprites.  Use the sprite costume editor to prepare your questions and lists of possible answers.  Use the Text tool to type your questions and answers for display as the sprite’s costume.  Use the “show/hide” and “switch costume” blocks to display the question and answers at the appropriate time in your program.  You may need to make changes to fit your text on the screen when displayed.

Information such as a score is set in variables, defined under the Variables blocks

“Initialization” is important:  be sure the correct answers are shown or hidden at the right times for your game to make sense.

Use the “ask” block under “sensing” to ask questions.  The answer to the most recently asked question is stored in a special automatic variable called “answer”

Use the orange if/else control blocks with green Boolean operator blocks (such as the “does this equal that” block) to check the answer, change the score, and provide feedback on correct or incorrect answers.

Resources

There are three videos which explain the required concepts and demonstrate how they are applied in the assignment:

Conditional processing using Boolean expressions

Showing and hiding blocks of text for the possible answers to each question using sprite costumes

Putting it all together including giving the user feedback.  This is a longer video showing almost all of the required elements of the assignment.

There is also an example in the Examples Studio on the Scratch website which you may examine and use as a resource.

Minimum Requirements

You must ask at least four multiple choice questions.  Each question must have at least four possible answers to choose from.

After each question is answered, you must tell the player if they were correct or incorrect.

You must keep a score of correct answers

At the end of the game you must provide at least two different messages to the player depending on their final score, for example, “great job” or “try harder” (please come up with something more creative than those boring messages though!)

Exceeding Expectations

Meeting the bare requirements makes for a pretty basic game.

All projects exceeding expectations demonstrate have a consistent theme in which each sprite and all text support the theme and rewards the user for engaging with your project.  Correct spelling, grammar, and providing instructions are expected of a project which exceeds expectations.  A project which exceeds expectations does not frustrate, confuse, punish, or insult the user but rather it is fun and a source of delight that encourages continued exploration and use.

To exceed expectations, implement some of the following suggested enhancements:

Don’t Repeat Yourself:  eliminate the repeated code for presenting and evaluating each question by replacing it with a My Block.

Scramble it up!:  Make the questions appear in random order.  Make the answers appear in random order.  This will involve the use of a List variable.

Your Great Idea:  Dream up a neat spin on the project and get it approved.