A basic calculator app in Python.
Uses shunting yard algorithm to evaluate simple mathematical expressions.
Supports:
- Addition
- Subtraction
- Multiplication
- Division
- Exponentiation
- Brackets
- Unary positive and negative
First make sure Python 3.8 and Pipenv are installed.
Clone the repository and enter the root directory:
git clone https://github.com/whabbot/calculator.git
cd calculator
Install dependencies using Pipenv:
pipenv install
Run the app from inside root directory:
pipenv run python prog/main.py
Install dev dependencies using Pipenv:
pipenv install --dev
This installs pytest which is used for testing. Tests are located in the tests directory.
Run tests using pytest:
pytest