Type: Intermediate Python GUI Project
Built With: Python
, tkinter
, Pillow
, requests
, Open Trivia DB API
Quizzler is an interactive True/False quiz game that pulls real trivia questions from the Open Trivia DB API. Players select a category and difficulty level, answer multiple questions, and receive real-time score updates with visual feedback and a dynamic progress bar.
- Live trivia questions fetched from an online API
- GUI built using
tkinter
- Object-oriented structure with classes (
Question
,QuizBrain
,QuizInterface
) - True/False answer buttons with immediate feedback
- Display questions and score
- Fetch data from API
- True/False buttons with result feedback
- Difficulty selection (Easy, Medium, Hard)
- Category dropdown with mapped IDs
- Error handling for no results or bad API responses
- "Back to Start" option when quiz fails to load
- Final score summary screen
- Restart quiz or quit options
- Dynamic progress bar showing quiz completion status
- Progress label: “Progress: 4 / 10”
- Hover effects for buttons
- Cursor change to pointer (
hand2
) on interactive elements - Smooth fade-in animation when displaying each new question
Start Screen | Question Loaded |
---|---|
![]() |
![]() |
Correct Feedback | Incorrect Feedback | Final Score |
---|---|---|
![]() |
![]() |
![]() |
- Clone the repo:
git clone https://github.com/your-username/quizzler-app.git
cd quizzler-app
- Install required packages:
pip install -r requirements.txt
- Run the app:
python main.py
- Integrating third-party APIs and parsing JSON responses
- Applying object-oriented principles to manage UI, data, and logic
- Improving UX with animations and hover interactions in
tkinter
- Designing scalable, modular Python apps
- Python 3.x
tkinter
– for GUI renderingrequests
– for API communicationPillow
– for image handling- Open Trivia DB – trivia question data
- 💾 Save high scores locally
- 🌗 Add theme toggle (light/dark mode)
- 📊 Add timer countdown
- 📱 Make mobile-friendly with
customtkinter
or convert to web app withFlask
quizzler-app/
│
├── assets/ # Button images (true.png, false.png)
├── media/
│ ├── demo/ # GIF demo
│ └── screenshots/ # Static screenshots for README
├── api_handler.py # Handles Open Trivia API logic
├── main.py # Entry point
├── question_model.py # Question data class
├── quiz_brain.py # Quiz logic and flow control
├── ui.py # All GUI logic and visuals
├── utils.py # (Currently unused, placeholder for helpers)
├── requirements.txt # Pip dependencies
├── .gitignore # Ignore rules
└── README.md # You are here!