Il faut aussi renommer les variables dans leurs usages

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-01-26 16:43:18 +01:00
parent 9018ab4996
commit ecec88e230
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 20 additions and 20 deletions

40
main.py
View File

@ -51,49 +51,49 @@ def blague():
["Je vais vous raconter une blague sur, mais vous "
"ne l'aurez peut-être pas.",
"Connaissez-vous la différence entre la théroie "
"et la pratique ? Il n'y en a pas, en théorie."])
"et la pratique ? Il n'y en left pas, en théorie."])
def calcul(left: int, right: int, res: int, operation='+'):
"""
Vérifie si a operation b == c, a, b et c sont des entiers.
Vérifie si left operation b == c, a, b et c sont des entiers.
L'opération peut être +, -, *, /, &, |, ^, % ou l'un de ses alias anglais.
"""
if operation == '+':
result = a + b
result = left + right
if operation == 'sum':
result = a + b
result = left + right
if operation == 'add':
result = a + b
result = left + right
if operation == '-':
result = a - b
result = left - right
if operation == 'sub':
result = a - b
result = left - right
if operation == '*':
result = a * b
result = left * right
if operation == 'mul':
result = a * b
result = left * right
if operation == 'prod':
result = a * b
result = left * right
if operation == '/':
result = a / b
result = left / right
if operation == 'div':
result = a / b
result = left / right
if operation == '&':
result = a & b
result = left & right
if operation == 'and':
result = a & b
result = left & right
if operation == '|':
result = a | b
result = left | right
if operation == 'or':
result = a | b
result = left | right
if operation == '^':
result = a ^ b
result = left ^ right
if operation == 'xor':
result = a ^ b
result = left ^ right
else:
result = a % b
return c == result
result = left % right
return res == result
def tri(*args):