lundi 23 mars 2015

Python if wrong answer


temp = '32'
if temp > 85:
print "Hot"
elif temp > 62:
print "Comfortable"
else:
print "Cold"


Why does it give output 'Hot' , shouldn't it be 'Cold' ?


Aucun commentaire:

Enregistrer un commentaire