A set of five math-based mini-games for the terminal:
- brain-even - Determine if a number is even
- brain-calc - Calculate the result of arithmetic expressions
- brain-gcd - Find the greatest common divisor of two numbers
- brain-progression - Find the missing number in arithmetic progression
- brain-prime - Determine if a number is prime
uv tool install dist/hexlet_code-0.1.0-py3-none-any.whlAfter installation, run any game:
brain-even
brain-calc
brain-gcd
brain-progression
brain-prime- You need to answer 3 questions correctly to win
- One wrong answer ends the game
- Python 3.10 or higher
- uv package manager
brain_games/
├── cli.py # User greeting
├── engine.py # Common game engine
├── games/ # Game logic
│ ├── brain_even.py
│ ├── brain_calc.py
│ ├── brain_gcd.py
│ ├── brain_progression.py
│ └── brain_prime.py
└── scripts/ # Game launchers
├── brain_even.py
├── brain_calc.py
├── brain_gcd.py
├── brain_progression.py
└── brain_prime.py
Ruff - Linter for code style checking
SonarQube - Code quality inspection
GitHub Actions - Automated testing
uv run ruff check brain_games# Setup
uv sync
# Build package
uv build
# Install locally
uv tool install --force dist/hexlet_code-0.1.0-py3-none-any.whlCreated by fumiko8