Skip to content

Commit fad27df

Browse files
committed
Add README for Quiz application
1 parent 1ac6baa commit fad27df

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

python-quiz-application/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Build a Quiz Application With Python
2+
3+
This repository holds the code for the Real Python [Build a Quiz Application With Python](https://realpython.com/python-quiz-application/) tutorial.
4+
5+
## Dependencies
6+
7+
If you're running on Python 3.10 or earlier, then you need to install [`tomli`](https://pypi.org/project/tomli/) which is used to read TOML data files. You should first create a virtual environment:
8+
9+
```console
10+
$ python -m venv venv
11+
$ source venv/bin/activate
12+
```
13+
14+
You can then install `tomli` with `pip`:
15+
16+
```console
17+
(venv) $ python -m pip install tomli
18+
```
19+
20+
If 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.
21+
22+
## Run the Quiz
23+
24+
Enter one of the `source_code_...` folders. You can then run the quiz by running `quiz.py` as a script:
25+
26+
```console
27+
(venv) $ python quiz.py
28+
```
29+
30+
Check 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.
31+
32+
## Author
33+
34+
- **Geir Arne Hjelle**, E-mail: [[email protected]]([email protected])
35+
36+
## License
37+
38+
Distributed under the MIT license. See [`LICENSE`](../LICENSE) for more information.

0 commit comments

Comments
 (0)