No description
calculator.py | ||
README.md | ||
tests.py |
String Calculator
We need a calculator that receives a string as input and returns a string.
Examples
compute("1")
returns "1"compute("1 + 2")
returns "3"compute("1 + 2 + 3")
returns "6"compute("3 - 2")
returns "1"
Setup
python3 -m venv venv
. ./venv/bin/activate
pip install pytest
Run tests
pytest tests.py