Answer the question
In order to leave comments, you need to log in
Invalid syntax error in python, how to fix?
I recently started learning python, but every time I write an if statement, an invalid syntax error occurs, indicating that the error is due to a parenthesis at the end.
Here is the code:
plusminus=input("What do we do, plus or minus")
numderone=input("Enter the first number")
numdertwo=input("Enter the second number")
if(plusminus=="+")
print(numderone + numdertwo )
else(plusminus=="-")
print(numderone - numdertwo)
I hope they help me.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question