()
| 37 | |
| 38 | |
| 39 | def main(): |
| 40 | quiz_data = fetch_quiz_data() |
| 41 | score = 0 |
| 42 | question_number = 0 |
| 43 | |
| 44 | for question in quiz_data: |
| 45 | question_number += 1 |
| 46 | |
| 47 | display_question(question, question_number, score) |
| 48 | |
| 49 | answer = input("Enter Answer (To skip type 'skip'): ") |
| 50 | print("\n" * 10) |
| 51 | |
| 52 | if answer == "skip": |
| 53 | continue |
| 54 | |
| 55 | if check_answer(question, answer, score): |
| 56 | score += 1 |
| 57 | print("Wait moving to the next question...") |
| 58 | sleep(6) |
| 59 | else: |
| 60 | score -= 1 |
| 61 | print("Point deducted...") |
| 62 | print("Wait moving to the next question...") |
| 63 | sleep(6) |
| 64 | |
| 65 | print("\n" * 10) |
| 66 | print("Your final score is", score, "!") |
| 67 | print("Thanks for playing! 💜") |
| 68 | |
| 69 | |
| 70 | if __name__ == "__main__": |
no test coverage detected