No description
Find a file
2024-06-20 13:27:17 +02:00
calculator.py ajout fichiers de démarrage de l'exercice 2024-06-20 12:27:26 +02:00
README.md fix: correction d'une coquille 2024-06-20 13:27:17 +02:00
tests.py ajout fichiers de démarrage de l'exercice 2024-06-20 12:27:26 +02:00

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