A simple and interactive command-line quiz application built with Python.
The app fetches real-time multiple-choice questions from the Open Trivia Database API and challenges users with a hard-level sports quiz.
- Fetches live quiz questions from an external API
- Hard difficulty multiple-choice questions
- Randomized answer options for each question
- Automatic score calculation
- HTML entity decoding for clean question and answer text
- Graceful handling of invalid user input
- The app requests 10 quiz questions from the Open Trivia Database API.
- Each question is displayed one by one in the terminal.
- Answer choices are shuffled randomly.
- The user selects an answer by entering a number (1β4).
- The app validates the answer and updates the score.
- Final score is displayed at the end of the quiz.
- Python 3
- Requests β for API calls
- Open Trivia Database API
- Random β for shuffling answer choices
- HTML β for decoding special characters
- Clone the repository:
git clone https://github.com/your-username/python-quizz-app.git
- Navigate into the project directory:
cd python-quizz-app - Install dependencies: request, random, html, and sys