0

Please what is modulo operator

in python

9th Feb 2017, 4:41 PM
Edem
Edem - avatar
2 odpowiedzi
+ 3
the modulo operation displays the remainder. 4 % 2 // output 0 3 % 2 // output 1 => 3 / 2 = 1 => 1 * 2 = 2 => 2 + x = 3 => x = 1 hope it is clear what i mean and whats the % is
9th Feb 2017, 5:41 PM
R4xx4r
R4xx4r - avatar
0
modulo operator (%) is used to return the value the remainder when dividing 2 numbers . if 4 is divided by 2 then 4%2 returns a value 0
9th Feb 2017, 4:58 PM
Akhil Anand
Akhil Anand - avatar