+ 1

please explain how this equation is calculated in python >>> 1.25 % 0.5 0.25

please explain step wise

6th Mar 2019, 10:11 AM
Chaitanya Damaraju
Chaitanya Damaraju - avatar
1 Antwort
+ 7
% (modulo operator) finds the remainder of an integer division. 0.5 fits two times into 1.25, there will be a remainder of 1.25 - 2*0.5 = 0.25
6th Mar 2019, 10:40 AM
Anna
Anna - avatar