The following Python script raises syntax error:
def main(number, number2, equation):
if equation == 1:
number + number2 = answer
SyntaxError: cannot assign to operator is the raised error. Please help.
In python you set variables to be equal to the their result instead of the result to be equal to the variable. So where you have put
number + number2 = answer
You need to do
answer = number + number2
As what you are doing is making the sum of number and number2 equal to answer which is not possible
number + number2 = answeris not valid. It's because the assignment operator(=) assigns the right-hand side value to the left-hand side. Btw, don't get discouraged by the down votes. Keep up the learning.