I finds the remainder when you divide two numbers. For example, if you wanted to figure out if your variable was evenly divisible by 3, you see if <(variable)mod(3) = (0) >
Last edited by scmb1 (2010-03-22 07:56:03)
Offline
scmb1 wrote:
I finds the remainder when you divide two numbers. For example, if you wanted to figure out if your variable was evenly divisible by 3, you see if <(variable)mod(3) = (0) >
Almost, but not quite, because in that case a negative dividend should result in a negative result, i.e.
-11 mod 2 = -1 (Try it on 'Calculator' if you have a Windows OS)
But Scratch returns a positive number.
Last edited by nXIII (2010-03-22 12:22:20)
Offline
If you don't know what a block does, right-click it and select Help. A window will show up, explaining what the block does.
Offline
http://reference.wolfram.com/mathematica/ref/Mod.html
Mod[m, n]
gives the remainder on division of m by n.
Offline