To make sure I understood how the Float () function worked, I did this.
cucumbers = 100 num_people = 6 whole_cucumbers_per_person = cucumbers/num_people print whole_cucumbers_per_person float_cucumbers_per_person = 100./6 print float_cucumbers_per_person float (cucumbers) whole_cucumbers_per_person = cucumbers/num_people print whole_cucumbers_per_person
Going by what was explained on this page, I expected to get 3 printed lines, the first of which would be an integer quotient, and the second two of which would be float quotients.
However, what I got instead was this:
16 16.6666666667 16
the third printed line, which should represent the quotient of a float and an integer, is showing up as an integer quotient instead of a float quotient.
Why is it doing that?