2022-10-15 18:00:43 +05:30
..
2022-10-15 18:00:43 +05:30
2022-10-15 18:00:43 +05:30

Module Installalations:

pip install requests

pip install jsonlib (Most of time this will be there)

How this code works:

I have used request module here to access the url https://opentdb.com/api.php?amount=1

Once you run the code, One question will come, You just need to give the option number 1,2,3 or 4.

It will continue until you won't type 'quit' in your terminal.

The output will keep counting the no of correct and incorrect answers given by you till you quit.