Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexlet tests and linter status:

Actions Status Bugs Quality Gate Status Code Smells Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Technical Debt Maintainability Rating Vulnerabilities

About project

Brain Games is a console application project that offers 5 math games:

1. "Evenness Check" game. You have to correctly answer the question: "Is a number even?"
2. "Calculator" game. You have to calculate a problem with two numbers.
3. "GCD" game. You have to find the greatest common divisor of two numbers.
4. "Arithmetic Progression" game. You have to find the missing number in the progression.
5. "Is a Number Prime?" game. You have to correctly answer the question: "Is a Number Prime?"
Each game asks three questions. If you answer correctly, move on to the next one; if you answer incorrectly, the game ends.

2. Minimum requirements

Environment

Python version 3.12 or higher

prompt version 0.4.1 or higher

[for development] ruff version 0.14.1 or higher

3. Usage (available commands)

brain-even — "Evenness Check" game.

brain-calc — "Calculator" game.

brain-gcd — "GCD" game.

brain-progression — "Arithmetic Progression" game.

brain-prime — "Is a Number Prime?" game.

4. Installation and launch

Via pip

1. Clone the repository and navigate to the project folder

git clone <url of repository>
cd hexlet-code

2. (Recommended) Create and activate a virtual environment

python -m venv venv
source venv/bin/activate      # Linux/macOS
venv\Scripts\activate         # Windows

3. Install the package

pip install .

4. Launch any game, for example

brain-even

Via UV (recommended)

1. Clone the repository and navigate to the project folder

git clone <url of repository>
cd hexlet-code

2. Install uv if it is not already installed

curl -LsSf https://astral.sh/uv/install.sh | sh  # Windows/Linux/macOS/WSL

3. Create a virtual environment

uv venv

4. In the root of the project, run the installation

uv pip install .

5. Launch any game, for example

brain-progression

5. Installing for development

# pip
pip install -e .[dev]

# uv
uv pip install -e .[dev]

6. Removing

# pip
pip uninstall hexlet-code

# uv
uv pip uninstall hexlet-code

7. Examples of use

Example of installing a package, launching the brain-even game, victory and defeat

asciicast

Example of launching the brain-calc game, victory and defeat

asciicast

Example of launching the brain-gcd game, victory and defeat

asciicast

Example of launching the brain-progression game, victory and defeat

asciicast

Example of launching the brain-prime game, victory and defeat

asciicast

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages