Une indentation doit être un multiple de 4 espaces
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
461a0dac34
commit
3d3539930a
34
main.py
34
main.py
|
@ -45,39 +45,39 @@ def calcul(a, b, c, operation = '+'):
|
||||||
L'opération peut être +, -, *, /, &, |, ^, % ou l'un de ses alias anglais.
|
L'opération peut être +, -, *, /, &, |, ^, % ou l'un de ses alias anglais.
|
||||||
"""
|
"""
|
||||||
if operation == '+':
|
if operation == '+':
|
||||||
result = a + b
|
result = a + b
|
||||||
if operation == 'sum':
|
if operation == 'sum':
|
||||||
result = a + b
|
result = a + b
|
||||||
if operation == 'add':
|
if operation == 'add':
|
||||||
result = a + b
|
result = a + b
|
||||||
if operation == '-':
|
if operation == '-':
|
||||||
result = a - b
|
result = a - b
|
||||||
if operation == 'sub':
|
if operation == 'sub':
|
||||||
result = a - b
|
result = a - b
|
||||||
if operation == '*':
|
if operation == '*':
|
||||||
result = a * b
|
result = a * b
|
||||||
if operation == 'mul':
|
if operation == 'mul':
|
||||||
result = a * b
|
result = a * b
|
||||||
if operation == 'prod':
|
if operation == 'prod':
|
||||||
result = a * b
|
result = a * b
|
||||||
if operation == '/':
|
if operation == '/':
|
||||||
result = a / b
|
result = a / b
|
||||||
if operation == 'div':
|
if operation == 'div':
|
||||||
result = a / b
|
result = a / b
|
||||||
if operation == '&':
|
if operation == '&':
|
||||||
result = a & b
|
result = a & b
|
||||||
if operation == 'and':
|
if operation == 'and':
|
||||||
result = a & b
|
result = a & b
|
||||||
if operation == '|':
|
if operation == '|':
|
||||||
result = a | b
|
result = a | b
|
||||||
if operation == 'or':
|
if operation == 'or':
|
||||||
result = a | b
|
result = a | b
|
||||||
if operation == '^':
|
if operation == '^':
|
||||||
result = a ^ b
|
result = a ^ b
|
||||||
if operation == 'xor':
|
if operation == 'xor':
|
||||||
result = a ^ b
|
result = a ^ b
|
||||||
else:
|
else:
|
||||||
result = a % b
|
result = a % b
|
||||||
return c == result
|
return c == result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue