This is a Python program that allows users to take a quiz based on True or False questions. The program fetches 10 questions from the Open Trivia Database API and displays them in a beautiful GUI. Users can select either True or False as their answer, and the program will provide immediate feedback by changing the color of the canvas and displaying a message.
- Fetches 10 questions from the Open Trivia Database API using API and stores them in JSON format
- Displays the user's score at the top of the window
- Displays each question in a canvas below the score
- Provides two buttons for True and False answers
- Gives immediate feedback by changing the color of the canvas and displaying a "Correct" or "Incorrect" message
- Disables the buttons after 10 questions and shows the user's total score
- Clone the repository to your local machine.
- Open the terminal or command prompt and navigate to the directory containing the cloned repository.
- Install the required packages using the following command:
pip install -r requirements.txt
- Run the program by executing the following command:
python main.py
- The program will display the first question in the GUI.
- Click on either the True or False button to select your answer.
- The program will display a message indicating whether your answer was correct or incorrect.
- The program will then display the next question.
- Repeat steps 6-8 until you have answered all 10 questions.
- At the end of the quiz, the program will display your total score and disable the True and False buttons.