0
Please what is modulo operator
in python
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
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