I have a question that cannot use if else statements, or boolean.
ans=input("enter input")
If the answer is 0<ans<999 then it prints "hi". However, I cannot use if statements. Another condition is that if ans is >5000 and <6000 with an increment of 5000 (10,000<11,000) basically having a remainder of 5000 exists between each thousand then I need to print "hi".
I want to achieve both of these conditions,
one condition is that ans is less than 999 and one that is greater than 5000 but less than 6000.
How can I achieve this without if statements??
Aucun commentaire:
Enregistrer un commentaire