Hy guys. I started Python yesterday with a book, but the code below is getting an err. What is wrong?
>>> temp = int(input('Entre com a temperatura: '))
Entre com a temperatura: 23
>>> if temp < 0:
print('Congelando...')
elif 0 <= temp <= 20:
SyntaxError: invalid syntax
>>>
Tried to change the tab but does not work either:
>>> temp = int(input('Entre com a temperatura: '))
Entre com a temperatura: 23
>>> if temp < 0:
print('Congelando...')
elif 0 <= temp <= 20:
SyntaxError: unindent does not match any outer indentation level
>>>
elif
should be indented to the same level asif
. The error is telling you that that's not the case. – gil Feb 26 '16 at 0:44