(question, answer, score)
| 11 | |
| 12 | |
| 13 | def check_answer(question, answer, score): |
| 14 | correct_answer = html.unescape(question["correct_answer"]).lower() |
| 15 | answer = answer.lower() |
| 16 | |
| 17 | if answer == correct_answer: |
| 18 | print("Correct Answer! \nYour score is", score + 1) |
| 19 | return True |
| 20 | else: |
| 21 | print("Wrong Answer! \nYour score is", score - 1) |
| 22 | print(f"The correct answer is {html.unescape(question['correct_answer'])}") |
| 23 | return False |
| 24 | |
| 25 | |
| 26 | def display_question(question, question_number, score): |