Skip to content

bazarovstas/python-project-49

Repository files navigation

Logo

hands-on programming courses

Hexlet header image

Hexlet tests, linter and Code Climate status:

Actions Status Maintainability

Table of contents

1. The Brain Games
- 1.1 Even Game
- 1.2 Calc Game
- 1.3 GCD Game
- 1.4 Progressive Game
- 1.5 Prime Game
2. Tech Stack
3. Installation
4. Usage
5. Reinstall

The Brain Games

Brain Games is a set of 5 logic puzzles that let you test how smart you are:

Game Question Example
The Even Game Answer "yes" if the number is even, otherwise answer "no" 44
The Calc Game What is the result of the expression? 7 + 11
The GCD Game Find the greatest common divisor of given numbers 10 90
The Progressive Game What number is missing in the progression? 3 7 .. 15
The Prime Game Answer "yes" if given number is prime. Otherwise answer "no" 21

[BACK TO TOP]

Even Game

This demo of the even game shows the game process:
asciicast

[BACK TO TOP]

Calc Game

This demo of the calc game shows the game process:
asciicast

[BACK TO TOP]

GCD Game

This demo of the gcd game shows the game process:
asciicast

[BACK TO TOP]

Progressive Game

This demo of the progressive game shows the game process:
asciicast

[BACK TO TOP]

Prime Game

This demo of the prime game shows the game process:
asciicast

[BACK TO TOP]

Tech Stack

Static Badge Static Badge Static Badge Static Badge

[BACK TO TOP]

Installation

The installation is simple and does not take much time

1. Installing pipx

If you don't have a python 3.8+ than is required to install pipx:

  • Ubuntu:
sudo apt install pipx
  • Using pip:
python3 -m pip install --user pipx
  • Or on Windows via Scoop:
scoop install pipx

2. Install Poetry

If pipx is already installed, you can install poetry:

pipx install poetry

add pyproject.toml to project folder:

poetry new project_name

or in pre-populated directory:

poetry init

and the last thing in this step, install virtual environment:

poetry install

3. Repository

Visit GitHub at the following link: https://github.com/bazarovstas/python-project-49
and finnaly, enter the following command in the CLI:

poetry add git+ssh://[email protected]:bazarovstas/python-project-49.git

[BACK TO TOP]

Usage

you can use scripts from the Makefile by installing the package, or use poetry scripts without installing anything:

  • Poetry:
poetry run brain-even
poetry run brain-calc
poetry run brain-gcd
poetry run brain-progression
poetry run brain-prime
  • Scripts:
    generate a distributive and install them:
make build
make package-install

use one of the following commands to run a specific game:

brain-even
brain-calc
brain-gcd
brain-progression
brain-prime

[BACK TO TOP]

Reinstall

to reinstall the package, use the following command:

make package-reinstall

[BACK TO TOP]

About

brain-games educational repository

Resources

Stars

Watchers

Forks

Packages

No packages published