Tirsvad 06849e1cd7
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 17s
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Successful in 40s
TirSystem/git-workflows: Validate / validate (push) Successful in 46s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 59s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 2m2s
Merge pull request 'MIL-005: Framework baseline on top of the existing plan' (#34) from mil-005-framework-baseline into main
2026-11-15 10:51:57 +01:00
2026-11-15 17:42:39 +08:00
2026-10-04 16:58:12 +02:00

🚀 Higher Lower

A console game from Udemy's 100 Days of Code: The Complete Python Pro Bootcamp (day 14). Two Instagram accounts are shown. Guess which one has more followers. Every right guess adds a point and the winner stays for the next round. A wrong guess ends the game.

Compare A: Cristiano Ronaldo, a Footballer, from Portugal.

 _    __
| |  / /____
| | / / ___/
| |/ (__  )
|___/____(_)

Against B: Ariana Grande, a Musician and actress, from United States.
Who has more followers? Type 'A' or 'B':

📚 Table of Contents

🧭 Overview

  • Python 3.13 or newer, no runtime dependencies.
  • The function names follow the assignment: format_data, check_answer.
  • Each account is shown once per game; if you get through all 50, you win.
  • Follower counts are in millions and come from the assignment's data set.

Project layout

Path Content
src/higher_lower/ The game: game_logic.py (pure functions), game.py (the loop), game_data.py, art.py, constants.py
tests/ pytest tests
docs/ Planning and review documents (business case, plan, milestones, use case)
pyproject.toml Project configuration
Doxyfile Doxygen configuration

📋 Requirements

  • Python 3.13 or newer
  • Optional: Doxygen to build the source documentation

🛠️ Setup

Create a local virtual environment in .venv, activate it, and upgrade pip.

Windows (PowerShell):

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

Windows (Git Bash), Linux and macOS:

python -m venv .venv
source .venv/Scripts/activate   # Linux/macOS: source .venv/bin/activate
python -m pip install --upgrade pip

The game itself needs nothing more. To run the tests and the code checks, install the development tools:

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

▶️ Run

python -m higher_lower

Type A or B and press Enter. Press Ctrl+C to quit.

🧪 Tests

python -m pytest

Check the code style and types:

python -m ruff check src tests
python -m ruff format --check src tests
python -m mypy src tests

Build the source documentation

The source uses Doxygen comments. The HTML output goes to docs/doxygen/html.

doxygen Doxyfile

📄 License

GNU Affero General Public License v3.0. 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
Use Case Diagram The player and the use case of the game
User Stories What the player wants from the game
Use Case The steps of playing one game
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
Higher Lower game: guess which Instagram account has more followers. Udemy 100 Days of Code, day 14. Python 3.13+, no runtime dependencies.
Readme AGPL-3.0
358 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%