# What purpose does modulo serve?

**URL:** <https://discourse.codecombat.com/t/what-purpose-does-modulo-serve/14891>\
**Category:** Uncategorized\
**Created:** [June 4, 2018, 12:02am UTC](https://discourse.codecombat.com/t/what-purpose-does-modulo-serve/14891 "2018-06-04T00:02:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![awwsoclose](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@awwsoclose](https://discourse.codecombat.com/u/awwsoclose)\
**Post date:** [June 4, 2018, 12:02am UTC](https://discourse.codecombat.com/t/what-purpose-does-modulo-serve/14891/1 "2018-06-04T00:02:25Z")

</div>

Hello everyone,

sorry for posting 2 topics in one day, but I am at a complete loss.

I’m in the middle of Zig, Zag, and Zoom which uses a modulo operation. I just don’t get what we use it for in that level and the one before it. like, why use that instead of adding or subtracting from the x and y position? I just really don’t get modulo at all.

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [June 11, 2018, 9:59pm UTC](https://discourse.codecombat.com/t/what-purpose-does-modulo-serve/14891/3 "2018-06-11T21:59:13Z")

</div>

it’s just a mathematical formula where a remainder is derived and you base your code on the existence or lack of that remainder.
