Automated Quiz:I need a code elapsed time every each question, the fastest and slowest answering question time, what code I use?
class Question: def __init__(self, prompt, answer, choice): self.prompt = prompt self.answer = answer self.choice = choice MC = [ "Herbivores: a. Elephants, b. Lions, c. Plants: ", "Birds: a. Dove, b. Elephant, c. Ants: ", "Mammal: a. Dove, b. Elephant, c. Shark: ", "Insect: a. Fly, b. Dolphin, c. Lion: " ] choice = "" Q1 = Question(MC[0], "a", choice) Q2 = Question(MC[1], "a", choice) Q3 = Question(MC[2], "b", choice) Q4 = Question(MC[3], "a", choice) questions = [Q1, Q2, Q3, Q4] def run_test(questions): score = 0 for i in questions: i.choice = input(i.prompt) if i.choice == i.answer: score += 1 print("Final score: ", score,"/4") print() for i in questions: print("Question: ", i.prompt) print("Correct answer: ", i.answer) print("Your choice: ", i.choice) Print() run_test(questions)