Im pretty sure this topic should be closed right? My reply fully answered it.
what is modulo is it a percent?
I already had explained it, Modulo is an expression that returns the remainder of a division.
If you did
print(7 % 3)
You would get 1 since 7 divided by 3 is 2 remainder 1. You were just dividing, you werenât using the modulo, youâll typically see it used in programming
modulus, not modulo.
It gets the remainder in a truncated division.
say you have 2 people who need cookies, and 3 cookies.
the division would look like 3 / 2, and be 2 with remainder 1 right? (if you are doing truncated division)
if you typed it like 3 % 2 (3 mod 2) then the answer would be 1 because it gets the remainder.
it is modulo
modulus is how you pronounce it
I know my math and I even looked it up to make sure I was right
really? lol my bad i didnât know that!
itâs fine, most people usually get this wrong because of how itâs said