Looking at Python for the first time … going through these tutorials
I'm running Python via SPSS Statistics (Python 3.4.3 Shell) and got this error which is entered directly from the tutorial:
>>> x = int(input("Please enter an integer: "))Please enter an integer: 55>>> if x < 0: x = 0 print('Negative changed to zero') elif x == 0:SyntaxError: invalid syntax>>>
>>> x = int(input("Please enter an integer: "))Please enter an integer: 55>>> if x < 0:... x = 0 File "<stdin>", line 2 x = 0 ^IndentationError: expected an indented block>>>
thanks! Yes, I figured out about spacing and not tabs … but thanks, especially for the coding/IDE tips.