From be7efbbfa7c17ac01a90e7dd53f298b926f6d2f1 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 28 Jan 2021 14:45:58 +0100 Subject: [PATCH] =?UTF-8?q?Pour=20v=C3=A9rifier=20les=20calculs,=20on=20co?= =?UTF-8?q?mmence=20par=20transformer=20les=20entr=C3=A9es=20en=20entiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yohann D'ANELLO --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index fe60eda..376d083 100755 --- a/main.py +++ b/main.py @@ -79,6 +79,10 @@ def calcul(left: int, right: int, res: int, operation='+'): Vérifie si left operation b == c, où a, b et c sont des entiers. L'opération peut être +, -, *, /, &, |, ^, % ou l'un de ses alias anglais. """ + left = int(left) + right = int(right) + res = int(res) + if operation in ['+', 'add', 'sum']: result = left + right if operation in ['-', 'sub']: