Question: why count_to=100/99 is 1 in Python?


#1

42

why count_to=100/99 is 1 in Python ?


#2

the division involves two integers, so python will return a integer as well. If needs be, python will just floor (round down) the result

This division behaviour changed in python3.


#3

thank you very much!!!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.