Chapter Guide
Use this page to map the book to the source files in the repository.
| Chapter | File | What it contains |
|---|---|---|
| 1 | hello.py | A simple first program. |
| 2 | guess_game_v1.py | Version 1 - The first guessing game version. |
| 3 | guess_game_v2.py | Version 2 - The next step in the game’s evolution. |
| 4 | guess_game_v3.py | Version 3 - Looping and repeated play concepts start taking shape. |
| 5 | guess_game_v4.py | Version 4 - Another refinement in the model. |
| 6 | guess_game_v5.py | Version 5 - The game becomes more capable. |
| 7 | guess_game_v6.py | Version 6 - Nested logic for a smarter game. |
| 8 | guess_game_v7.py | Version 7 - Nested loops to replay the game |
| 9 | guess_game_v8.py | Version 8 - The game becomes more resilient. |
| 10 | prompts.md | AI prompt examples and cautionary notes. |
How to run a file
To run the code, copy it into your Python environment and execute it locally.
You can also download the raw file from GitHub.
From a terminal or command prompt, you can run the file with a command like this:
python code/chapter-02/guess_game_v1.py
If that does not work, try:
python3 code/chapter-02/guess_game_v1.py