0

How is the answer 0.25 shouldn't it be 2.5

>>> 1.25 % 0.5 0.25

5th Feb 2019, 4:12 AM
M. Anne
M. Anne - avatar
1 Answer
+ 1
1.25 = 0.5*2 + 0.25 But if you try 1.4%0.2, it will be 0.2, and 1.4//0.2 is 6.0. Possible it depends on the internal representation of numbers in python.
5th Feb 2019, 6:15 AM
Vladimir {Tomsk}
Vladimir  {Tomsk} - avatar