A program that administers and grades a multiple-choice exam. It starts off with 5 questions and repeats the questions that were incorrectly answered until all questions have been correctly answered.
def quiz(): questions = ['1. What color is the sky?\na. Blue\nb. Red\nc. Green\n', '2. What color is the sun?\na. Blue\nb. Red\nc. Yellow\n', '3. What color is an apple?\na. Blue\nb. Red\nc. Green\n', '4. What color is a banana?\na. Blue\nb. Red\nc. Yellow\n', '5. What color is the grass?\na. Blue\nb. Red\nc. Green\n'] answers = ['a', 'c', 'b', 'c', 'c'] print("Welcome to the quiz.") score = 0 total = len(questions) n = 0 while n < len(questions): print(questions[n]) ans = input('Enter your answer: ') if ans == answers[n]: print("Correct!\n") score +=