# Zig Zag and Zoom bug (python)

**URL:** <https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831>\
**Category:** Bugs\
**Created:** [February 9, 2018, 2:26pm UTC](https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831 "2018-02-09T14:26:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DragonCoder](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DragonCoder](https://discourse.codecombat.com/u/DragonCoder)\
**Post date:** [February 9, 2018, 2:26pm UTC](https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831/1 "2018-02-09T14:26:41Z")

</div>

My hero gets stuck before the third zigzag. I think my code is correct, but can you check it for me?

 ![Capture](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/e/e8ea881b497a063a5378805daa2e402b9138c889.PNG)

---

<div class="post-metadata">

**Author:** ![Seojin\_Roy\_Lee](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/seojin_roy_lee/32/23539_2.png) [@Seojin\_Roy\_Lee](https://discourse.codecombat.com/u/Seojin_Roy_Lee)\
**Post date:** [February 9, 2018, 4:32pm UTC](https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831/2 "2018-02-09T16:32:52Z")

</div>

change the `if` statement in `mod9(n)` to a `while` loop

---

<div class="post-metadata">

**Author:** ![TheDemonPrince](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thedemonprince/32/7366_2.png) [@TheDemonPrince](https://discourse.codecombat.com/u/TheDemonPrince)\
**Post date:** [February 9, 2018, 4:53pm UTC](https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831/3 "2018-02-09T16:53:50Z")

</div>

Like he said change it

---

<div class="post-metadata">

**Author:** ![DragonCoder](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@DragonCoder](https://discourse.codecombat.com/u/DragonCoder)\
**Post date:** [February 10, 2018, 10:20am UTC](https://discourse.codecombat.com/t/zig-zag-and-zoom-bug-python/13831/4 "2018-02-10T10:20:21Z")

</div>

Oh, I didn’t realize that. Thanks!
