Brain Games includes five math games: 'Parity Check', 'Calculator', 'Greatest Common Divisor', 'Arithmetic Progression' and 'Prime Numbers'.
All games are started and played using the terminal.
This is the first project on Python, so it's extremely simple.
Clone this repo or download it with pip:
git clone https://github.com/zluuba/brain-games.git
pip install --user git+https://github.com/zluuba/brain-games.git
Install package and dependencies:
cd brain-games
make install
make build
make package-install
Type these commands to start the games:
# Parity Check game.
# Given a number, you must enter "yes" if the number is even and "no" if it's not.
brain-even
# Calculator game
# Given a mathematical expression, you need to calculate it and enter the result.
brain-calc
# The Greatest Common Divisor game
# Two numbers are given, you need find the greatest common divisor and enter the result.
brain-gcd
# Arithmetic Progression game
# Given an arithmetic sequence in which one number is hidden, you must enter the missing number.
brain-progression
# Prime Numbers game
# Given a number, you must enter "yes" if the number is prime and "no" if it's not
brain-prime
More about GSD and prime numbers.
If you have changed a few lines of code, use these commands to apply all the changes:
make build
make reinstall
To check the current project for compliance with the PEP8 standards, use this command:
make lint
The next command runs tests and checks the project for correctness:
make test