This Python program allows users to create a quiz with True/False questions and then tests the user's knowledge with randomly selected questions from the set. It also calculates and displays the final score based on correct answers.
- Question Input: Users can input a desired number of questions and their corresponding answers (True/False).
- Random Selection: The program randomly selects 5 questions from the set and presents them for the user to answer.
- Score Calculation: For each correct answer, the user's score is increased by 1, and the final score is displayed.
Enter the number of total questions: 5
Question: Python is a programming language.
Answer: True
Question: The Earth is flat.
Answer: False
...
Question: Python is a programming language.
True
Your score: 4Validates that answers are either True or False. Ensures that the user inputs a minimum of 5 questions to proceed with the quiz.
Python 3.x