( ) mod ( ) (Remainder) — Scratch Block Guide
Returns the remainder after dividing the first number by the second.
What this block does
Returns the remainder after dividing the first number by the second.
Test even/odd (n mod 2 = 0), wrap angles, or trigger events every 5 points.
- Category: Operators Blocks
- Key tip: Super useful for cycling cleanly through costumes or turns.
Working Scratch example
Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.
- When green flag clicked
- If ((score) mod (10)) = (0) then
- Say Bonus milestone!
Try it: Celebrates every multiple of 10 points.
Related block guides
Explore other blocks in the same category or return to the full English Block Dictionary.
FAQ
When should I use "( ) mod ( ) (Remainder)" in Scratch?
Test even/odd (n mod 2 = 0), wrap angles, or trigger events every 5 points. Super useful for cycling cleanly through costumes or turns.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.