Class Quiz

Let’s code a class quiz.

In Purple Mash:

  1. Go to Work.
  2. Expand the My Class folder.
  3. Click on the Class Quiz folder.
  4. Open the 2Code program Quiz Starter.

Here is the code:

code

Edit the code to make a question of your own.

  1. Change the text in the first two print to screen blocks to ask your question.
  2. Change both tests to Input | equals | {your answer}
  3. Test your question

When you are confident that your question is a good one and that it properly checks that the user was right, you are ready to save it.

  1. Press Hamburger: Save.
  2. Check that the save location is: My Class > Class Quiz
  3. Enter your first name as the file name.
  4. Press the Save button (then x the box).

Change the restart block at the end of the program to a launch block. Use the launch block to connect to another question in the folder.

code

code

We need to make sure to add everyone’s question in a chain, so listen to your teacher.

You might need to wait for more questions to be saved.

While you wait

Improve the look of your question by changing the background properties or adding a design.