Contact details
Digital Circus
Ian Kenny

503 Queen Street West

Hastings

0212255459

06 8767028

ian.kenny@digitalcircus.org.nz

Proudly Supported By

Interactive quiz!

Activity:

To create a quiz that will test your friends knowledge about you!

Step one:

Just like TV quiz shows, we need someone to be the host of our quiz. You are going to delete the cat from our sprites panel and add someone of your choice from the sprite library.

To delete the cat right-click on it in the sprites area and select delete. Next select "add sprite from library" and choose whoever you want by double clicking on them.

Step two:

Now we need a fancy new background.

Go to your backdrop library and choose

a cool background to start off your quiz.

Step three:

Next we need to code our background to appear when we press green flag.

 

Making sure that you have selected your backdrop, add the "when green flag clicked" from the events menu.

 

Then from the looks category, select the "switch to backdrop".

Step four:

Now, to begin our quiz it would be a good idea to have our host welcome the player. We will be using the "say" block in the looks category. You can type your own welcome message.

Step five:

To ask a question we will use the block.

 

 

 

This block will bring up a box that they can type the answer into. Add this to your code and insert your own first question. You will find it in the sensing category.

Step six:

When anything is typed in the "ask" block it is stored in the "answer" bubble. We can then use the bubble to check if they have answered the question correctly.

To show how this bubble work, you are going to get a "say" block from the looks category and put the "answer" bubble in it.

When you press the green flag, what ever you type in the box will be said by our host.

If a second "ask" block has be answered, only the last answer will be stored in the "answer" bubble.

Step seven:

After the person has answered our question, we need to have some code that will check if the answer is correct.

 

In the control category you will see the "if then" block. This block checks to see if a condition is True. We want to see if the "answer" = the correct answer so that is our condition. You can get the green "=" from the operators category, you put the "answer" bubble in the first box and write the correct answer in the second box.