Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.5 KB

File metadata and controls

59 lines (42 loc) · 1.5 KB

Python Quiz App 🎯

Python License

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.


🚀 Features

  • 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

🧠 How It Works

  1. The app requests 10 quiz questions from the Open Trivia Database API.
  2. Each question is displayed one by one in the terminal.
  3. Answer choices are shuffled randomly.
  4. The user selects an answer by entering a number (1–4).
  5. The app validates the answer and updates the score.
  6. Final score is displayed at the end of the quiz.

🛠️ Technologies Used

  • Python 3
  • Requests – for API calls
  • Open Trivia Database API
  • Random – for shuffling answer choices
  • HTML – for decoding special characters

📦 Installation

  1. Clone the repository:
    git clone https://github.com/your-username/python-quizz-app.git
    
  2. Navigate into the project directory:
    cd python-quizz-app
    
  3. Install dependencies: request, random, html, and sys

Created by Naymul Hasan