Skip to content

Darys21/Quiz_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Quiz_game

a random quiz game in python by ANGUILET Joan

Quiz Game

This program is a quiz game that asks a user a series of 20 random questions pulled from an API. The user must answer each question and receives a score at the end based on how many questions were answered correctly.

Functionality

The program uses the Open Trivia DB API to retrieve 20 random trivia questions in a variety of categories, including history, science, and entertainment. The user is prompted to answer each question and can choose from a set of multiple-choice answers. Once all questions have been answered, the program displays the user's score and the correct answers to each question.

To run the program, the user must have Python 3 installed on their machine, as well as the requests library. The program can be run by navigating to the directory containing the quiz_game.py file in a terminal window and running the command python quiz_game.py.

Usage

To play the quiz game, simply run the quiz_game.py file using the command python quiz_game.py. Once the program is running, follow the on-screen prompts to answer each question. After all questions have been answered, the program will display your final score.

Examples

Here is an example of what a game session might look like:

Welcome to the Quiz Game!

Question 1: What is the capital of France? a. Madrid b. Paris c. Berlin d. Rome Answer: b

Question 2: What is the smallest planet in our solar system? a. Mercury b. Venus c. Earth d. Mars Answer: a

...

Your final score is 18 out of 20. Well done!

Known Issues

There are currently no known issues with the program.

License

This program is licensed under the MIT License. See the LICENSE file for more information.

About

a random quiz game in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages