+ 2

Why does my code write that line 10 is incorrect and there is a syntax error?

https://code.sololearn.com/cjb9T31EjN3a/?ref=app

12th Jan 2022, 3:41 PM
RASTY
RASTY - avatar
4 odpowiedzi
+ 5
RASTY , both of your operations are performing an addition, but the second one has to be a subtraction. ... elif operation == "-": c = a + b # should be: c = a - b ...
12th Jan 2022, 5:51 PM
Lothar
Lothar - avatar
+ 2
Hello RASTY I don't know. Your bug is in line 9 : print("Result " + str(c) <- add ) to close print()
12th Jan 2022, 3:46 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Thank you
12th Jan 2022, 3:48 PM
RASTY
RASTY - avatar
0
You were missing one closing parentheses in this line: print("Result " + str(c))
12th Jan 2022, 3:44 PM
Christoph