Creating a Multiple-Choice Quiz Application in Scratch

Welcome back! In this tutorial we will learn how to create a multiple-choice application in Scratch. You may choose the theme/topic of your multiple choice quiz separate from the example contained here.

Objective: To learn how to utilize the list datatype to create a question/answer database through an indexing scheme. You will also try out the text2speech extension provided through Amazon's web servers.

Final Product (Example of U.S. Gov. Quiz):


Graphical Template: Link

*Please note that you will need to import the text2speech extension in the same way you imported the music (MIDI) and pen extension. If you need a reminder on how to do that please visit either of those two tutorials: MIDI & Pen.*

Scripts: 

Sprite4

Sprite 4 Scripts

Sprite3

Sprite3 Scripts

AnswerThePublic

AnswerThePublic Sprite

Sprite2

Sprite2 Scripts

NextQuestion

Next Question Button Scripts

AudioSign

Audio Text2Speech Scratch Scripts

Sprite1

String Combiner Script

DefaultScripts

Question and Answer Database Creation

Please note that in order to add more questions you will need to duplicate the script (right click on the question "add" command and hit duplicate) in groups of five (i.e. you add another question and four answers to the chain). In my example I ended up with four-hundred add statements which is the equivalent of eighty questions!

Debugging: Check over the way you arrange you addition statements for the questions/answers. If these are in the wrong order then you won't be able to successfully index through the database!

Completed Example: Link (same as final product)




No comments:

Post a Comment