I am new to Python. I keep getting this errir (unexpected EOF while parsing) when running Spyder. It happens on conditional statements. here is an example.
Thanks in advance...
CODE:
num = 100
while not False:
if num < 0:
break
print('num is: ' + str(num))
ERRORS:
[3]: if num < 0:
File "<ipython-input-3-ae57f3d300c9>", line 1
if num < 0:
^
SyntaxError: unexpected EOF while parsing
break
File "<ipython-input-4-6aaf1f276005>", line 1
break
^
SyntaxError: 'break' outside loop