0

Can anyone find what’s wrong with the codes below?thank you

I hope it can help check the number inputed , but seems like something wrong with it. Can anyone help check that?thank you num = input('wirte down the number you need') if num > '5': print("Bigger than 5") if num <='47': print("Between 5 and 47")

30th Aug 2018, 4:46 AM
jill jealous
jill jealous - avatar
2 Respuestas
+ 4
Convert input to int. num = int(input()) and then compare num with integer values instead of strings. if num > 5: #...
30th Aug 2018, 4:49 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
ay,that’s it! thank you!
30th Aug 2018, 5:02 AM
jill jealous
jill jealous - avatar