I don't want a math lesson I want to program


Wtf is a modulo and what the h* does it have to do with programming? I bust my stuff to find an online tutorial that will teach programming and you funk it up with math questions.


Modulo's are very great for finding divisibility in programming. It returns the remainder of a number. If you don't enjoy math and logic, then programming is probably not for you.


I'm a beginner too and trust me; it gets really fun soon, don't give up just yet.


Okay I just typed in numbers until something worked. I am really fine with any math other than modulo. Maybe I can avoid modulo for the rest of my life and never see it again.


You can also be fine with modulo -- you just haven't had it explained the way your brain wants to hear it yet. :slightly_smiling:

Modulo is the remainder of a division problem.

First the division equation that you are used to, then see how the modulo equation works:

10 / 5 = 2 with 0 remainder
10 % 5 = 0

6 / 4 = 1 with 2 remainder
6 % 4 = 2


6/4 = 1.5
okay 2 remainder but 13/7 =1.857142857142857


Doing the division with decimals is confusing because you can't see the remainder.

13 / 7 = 1 with remainder 6
13 % 7 = 6


okay thanks now I finally got :grin: