+ 2

I don't understand modulo , the % symbol...help pls

28th Sep 2017, 3:34 PM
iAhmed
iAhmed - avatar
3 Answers
+ 12
Modulo gives you the floor division remainder. Normally, if you divide 23 / 5, the result is 4.6 But if you divide it using floor division: 23 // 5 equals 4 There is a remainder, though, as 4 * 5 equals 20, not 23. And this remainder - 3 - is returned by the modulo sign: 23 % 5 = 3
28th Sep 2017, 3:48 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
Thanks Kuba
29th Sep 2017, 7:54 AM
iAhmed
iAhmed - avatar