a1 = int(input('What is the temperature?'))
if a1 >= 85:
print('That is too hot')
elif a1 >= 55 and < 85
print('That is perfect')
elif a1 < 55:
print('Too cold')
I figured it out. By having the >= 55 and < 85 in the statement it was causing the error. This is because i am already covered by the >= 85 statement and it was not needed.
I rewrote the code to this and it works fine:
while True:
a1 = int(input('What is the temperature?'))
if a1 >= 85:
print('That is too hot')
elif a1 >= 55:
print('That is perfect')
elif a1 < 55:
print('Too cold')