I'm doing an exercise to learn python and the question is simple, just to generate code that can print out if variable x is even or odd. I'm getting the correct output when I run the code, but I also receive the following error message:
SyntaxError: invalid syntax (, line 1)
Here's my chunk:
x = 1
if (x % 2) == 0:
print("EVEN")
else:
if(x % 2) != 0:
print("ODD")
Can anyone tell me why I'm getting the error message along with the correct output?
Thanks!