+ 1
Can someone pls explain this to me pls
>>> 20 // 6 3 >>> 1.25 % 0.5 0.25
2 odpowiedzi
+ 4
Quotient and remainder of division
for example
19 = 3 x 5 + 4
So
19//5 is 3
19%5 is 4
+ 1
For your example
20//6 gives 3
'3' nothing but the quotient .
20 = 6 × 3 + 2
And 1.25 % 0.5 gives 0.25
2 × 0.5 = 1
so the remainder is 1.25 - 1 = 0.25
hope it helps