Skip to content

A Python-based command-line quiz application that fetches real-time sports trivia questions from the Open Trivia Database API and tracks user scores interactively.

License

Notifications You must be signed in to change notification settings

NHasan143/python-quizz-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

A Python-based command-line quiz application that fetches real-time sports trivia questions from the Open Trivia Database API and tracks user scores interactively.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages