This repository holds the code for the Real Python Build a Quiz Application With Python tutorial.
If you're running on Python 3.10 or earlier, then you need to install tomli which is used to read TOML data files. You should first create a virtual environment:
$ python -m venv venv
$ source venv/bin/activateYou can then install tomli with pip:
(venv) $ python -m pip install tomliIf you're running Python 3.11 or later, then tomllib provides TOML support in the standard library. In this case, you don't need to create a virtual environment or install any third-party dependencies.
Enter one of the source_code_... folders. You can then run the quiz by running quiz.py as a script:
(venv) $ python quiz.pyCheck out the questions.toml file for a list of the questions that are available (in step 4 and later). Edit this file to add your own questions.
- Geir Arne Hjelle, E-mail: geirarne@realpython.com
Distributed under the MIT license. See LICENSE for more information.