Modulo Operator

I do not understand this concept. Ive checked the other questions. My understanding from the example 144 % 12 = 0, is that we are dividing 144 by 12. 144/12=12. Im not understanding how we get zero. Sadly, I was unable to even follow in the video for idiots that was posted to another question on this subject. So please help me with a step by step of how this works. Thanks

144 is evenly divisible by 12
there is nothing left over
so remainder is 0

if you divide 10/3 you cant divide evenly
the maximum you can divide is 9/3
so remainder is 1

Modulo gives you the remainder

1 Like

this lady explains well

https://www.youtube.com/watch?v=C8RUgyCoM0I

1 Like

Ok. Totally get it now. Thanks.

The Modulo operator is not just for dividing, its output is the rest. So if you 10%3 you’ll get 1 :wink: