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 multiplechoice(): question = 0 correct = 0 while question < 5: if question == 0: answer = input("What is the capital of New York?") if answer == "Albany": correct += 1 else: question -= 1 elif question == 1: answer = input("What is the capital of California?") if answer == "Sacramento": correct += 1 else: question -= 1 elif question == 2: answer = input("What is the capital of New Jersey?") if answer == "Trenton": correct += 1 else: question -= 1 elif question == 3: answer = input("What is the capital of Florida?") if answer == "Tallahassee": correct += 1 else: question -= 1 elif question == 4: answer = input("What is the capital of Washington