0

Whats modulo operation?

help help python

25th Nov 2016, 12:22 PM
ryan
2 Antworten
+ 2
It involves returning the remainder after the division of a number by the other which utilizes an operator denoted by '%' Simple example: 1) 10 % 5 = 0 (does not have a remainder after division so it's 0) 2) 10 % 4 = 2 (the remainder of dividing 10 by 4 is in fact 2) So 10 modulo 4 is 2.
25th Nov 2016, 12:30 PM
Billy Noah
Billy Noah - avatar
0
okay thanks!!
25th Nov 2016, 12:31 PM
ryan