A Little Quiz¶
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.
Name your file:
little_quiz.py
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) In Python, the way you get keyboard input is the keyobard_input function.
1) true
2) false
> 1
Sorry, in Python, you would use the "input" function to get keyboard input.
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!
©2021 Daniel Gallo
This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Adapted for Python from Graham Mitchell’s Programming By Doing