please explain how this equation is calculated in python >>> 1.25 % 0.5 0.25 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answer
+ 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