Tirsvad 42f28475d2
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 27s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 58s
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Successful in 1m13s
TirSystem/git-workflows: Validate / validate (push) Successful in 1m3s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 2m24s
Merge pull request 'Add the framework baseline: gateway MIL-001, wiki, README, licence metadata' (#7) from mil-001-baseline into main
2026-11-15 10:24:17 +01:00
2026-11-15 17:21:59 +08:00
2026-10-04 16:20:58 +02:00

🔢 Guess The Number

A terminal Number Guessing Game, built as the day 12 project of Udemy's 100 Days of Code™: The Complete Python Pro Bootcamp.

📚 Table of Contents

🧭 Overview

The computer picks a number between 1 and 100. Choose a difficulty and guess it:

Level Attempts
easy 10
hard 5

After each guess you are told whether it was too high or too low.

Project layout

src/guess_the_number/   game code (constants.py, game.py)
tests/                  pytest tests
docs/                   Doxyfile

The functions set_difficulty, check_answer and play_game follow the course assignment's naming.

Documentation

Source comments use Doxygen. With Doxygen installed:

doxygen docs/Doxyfile

The HTML output is written to docs/build/html.

📋 Requirements

  • Python 3.13 or newer
  • No runtime dependencies (pytest is only needed for the tests)

🛠️ Setup

Create and activate a local virtual environment, then upgrade pip.

Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip

Linux / macOS:

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

▶️ Run

python -m pip install -e .
python -m guess_the_number

🧪 Tests

python -m pip install -e ".[dev]"
python -m pytest

📄 License

See LICENSE.

📎 Appendix: Project documents

The documents a newcomer needs, in reading order.

Document What it tells you
Business Case Why the project exists, its scope and success criteria
Stakeholder Analysis Who is involved; the stakeholder IDs used for owners and reviewers
Project Plan The gateways and their schedule
Milestones One document per gateway: Go/No-Go criteria and tasks
Artifact registry Where each artifact type lives, the next version, the PO language and domain
Traceability matrix How the artifacts link and when each was last reviewed

S
Description
Number Guessing Game in Python (Udemy 100 Days of Code, day 12): guess a number from 1 to 100 on easy or hard difficulty.
Readme AGPL-3.0
147 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%