Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » What does 'mod' do?
- LXtricityGames
-
38 posts
What does 'mod' do?
What does this block do, exactly??
i feel like it has something to do with the
i feel like it has something to do with the
block, am I correct?
- redzback
-
100+ posts
What does 'mod' do?
modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the modulus of the operation).In computing, the https://en.wikipedia.org/wiki/Modulo
Given two positive numbers a and n, a modulo n (often abbreviated as a mod n) is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.
For example, the expression “5 mod 2” evaluates to 1, because 5 divided by 2 has a quotient of 2 and a remainder of 1, while “9 mod 3” would evaluate to 0, because 9 divided by 3 has a quotient of 3 and a remainder of 0.
- PPPDUD
-
1000+ posts
What does 'mod' do?
Linkmodulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the modulus of the operation).In computing, the https://en.wikipedia.org/wiki/Modulo
Given two positive numbers a and n, a modulo n (often abbreviated as a mod n) is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor.
For example, the expression “5 mod 2” evaluates to 1, because 5 divided by 2 has a quotient of 2 and a remainder of 1, while “9 mod 3” would evaluate to 0, because 9 divided by 3 has a quotient of 3 and a remainder of 0.
- housemuseum
-
100+ posts
What does 'mod' do?
What does this block do, exactly??
i feel like it has something to do with theblock, am I correct?
basically means the remainder of a division
Last edited by housemuseum (Sept. 25, 2023 17:55:54)
- han614698
-
1000+ posts
What does 'mod' do?
It returns the remainder after dividing something.
For example,
would divide five by two, and then report the remainder of one.
This is one easy way to see if a number is odd or even -

For example,
This is one easy way to see if a number is odd or even -
- Discussion Forums
- » Questions about Scratch
-
» What does 'mod' do?