It’s time for a quiz, and you will be the online quizmaster! Get creative and come up with a multiple-choice trivia question for today’s task.
Write a program called `multiplechoice.py` that uses a `while` loop to repeatedly ask the user for their answer to your trivia question until they answer correctly. Just like you can see in the example output below, your program should follow the following criteria:
✅ Your program should:
-!- CODE language-text -!-Who was the first US President?
1) Abe Lincoln
2) Teddy Roosevelt
3) George Washington
4) John Adams
Answer? 2
Incorrect!
Who was the first US President? 3
Correct!
CodeGrade is your virtual teaching assistant in your Python classroom. You teach, CodeGrade takes care of the rest.
Our 35 built-in fully automatically graded Introduction to Programming assignments are designed especially for middle school and high school coding education, in close collaboration with Harvard-Westlake School (Los Angeles, CA). You can start teaching Python at your school with confidence now. Or, easily scale your classroom with CodeGrade's tools.
Book a personal 30-minute demo now and we'll show you how to get started with CodeGrade in less than 1 hour!