Teaching, Materials, Python, Interactive, Quizzes.
run_quiz_advanced(): random.shuffle(questions) start_time = time.time() score = 0 for q in questions: random.shuffle(q["choices"]) answer = questionary.select( q["question"], choices=q["choices"] ).ask() if answer == q["correct_answer"]: print("Correct!") score += 1 else: print("Incorrect.")