Invalid Syntax Error on Python Function
Hey guys,
I have been trying to write a function in python and keep getting an invalid syntax error and I'm not sure why. This is my current code: Code:
def aero_top(x): Code:
File "NACA_Aerofoil_Spyder.py", line 22 Thanks. |
Quote:
if x == 1: |
That worked! Thank you!
Any idea why I had to write it that way? |
The Python language has many similarities to Perl, Java and C. However, there are some definite differences between the languages.
Many Python constructs, like if, while, and for, require a terminating colon : . Also, '=' is the assignment operator while '==' is the 'is equal to' comparison operator. |
All times are GMT -5. The time now is 06:34 PM. |