Write an interactive quiz. It should ask the user three multiple-choice or true/false questions about something. It must keep track of how many they get wrong, and print out a "score" at the end.
Are you ready for a quiz? N Okay, here it comes! Q1) What is the capital of Alaska? 1) Melbourne 2) Anchorage 3) Juneau > 3 That's right! Q2) Can you store the value "cat" in a variable of type int? 1) yes 2) no > 1 Sorry, "cat" is a string. ints can only store numbers. Q3) What is the result of 9+6/3? 1) 5 2) 11 3) 15/3 > 2 That's correct! Overall, you got 2 out of 3 correct. Thanks for playing!
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.