Let’s create a quiz about Covid19: use the provided project to explore the Show Menu block and create your own quiz!
You can create an interactive quiz very easily with the Show Menu block!
For example a block like this…
…will produce this to the user:
Your program will wait for the user to select an answer and click the confirmation button.
The answer will be available as Get answer block and can be used to create if condition and change the behavior of your program. For example you may provide a correct and wrong answer feed back to the the user.
Teachers and Trainers suggestion
A good way to learn is creating something about the subject we are studying: remix this project to focus the attention of your students on a particular subject by including some specific questions in the code. You can then share the link as a Training activity!
You can create complex conditions by configuring the if block! In this example if the answer is not equal to Correct answer your program will execute the else statement.
Conditional statements are a fundamental aspect of coding as it permits having a program executing specific blocks of code under specific conditions!
What are you waiting for? Let’s learn more about Covid19 by creating your own quiz using this Getting Started Project
Would you like a bigger challenge? Try remixing this Advanced Project – Using variables to create a “score system”