Welcome to the Trivia Game! This engaging quiz application utilizes the Open Trivia API to fetch and present questions across various categories and difficulty levels. Test your knowledge in multiple-choice or true/false formats and see how many questions you can answer correctly.
- Python 3.x
- Required Python packages:
requests
,tkinter
,pygame
- Clone the repository to your local machine.
- Install the required packages using the following command:
pip install requests pygame
- Run the game using the following command:
python trivia_game.py
- Select Category: Choose a category from the dropdown menu.
- Choose Difficulty: Select the difficulty level: Easy, Medium, or Hard.
- Set Question Count: Specify the number of questions you want to answer (5, 10, 20, or 25).
- Select Game Type: Choose between Multiple Choice or True/False.
- Enable Timer (Optional): Tick the timer checkbox to add a time limit to each question.
- Start the Game: Click "Continue" to begin the game.
- Read each question carefully and select your answer.
- If the timer is enabled, respond within the time limit for each question.
- After answering all questions, the game will display your final score.
- Q&A provided by the Open Trivia API.
- The game leverages the
requests
library for API communication andpygame
for playing sound. - Special thanks to the Open Trivia API for providing the trivia questions.
Trivia, Quiz Game, Open Trivia API, Python, Tkinter, Educational Game, Python Trivia Game
- The code is extensively commented for easy understanding.
- The file order has been optimized for efficiency and clarity.
Feel free to contribute to the project or report any issues. Enjoy playing!