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.
Get ready for a quiz! Q1) What is the capital of Alaska? A) Melbourne B) Anchorage C) Juneau > C That's right! Q2) Can you store the value "cat" in a variable of type int (yes or no)? > yes Sorry, "cat" is a string. ints can only store numbers. Q3) What is the result of 9+6/3? A) 5 B) 11 C) 15/3 > B 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.