# Sand Snakes (Python) These levels are throwing me for a loop\[SOLVED\]

**URL:** <https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579>\
**Category:** Level Help\
**Created:** [February 22, 2021, 11:58pm UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579 "2021-02-22T23:58:20Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:10am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/21 "2021-02-23T01:10:17Z")

</div>

that seems a little wierd

---

<div class="post-metadata">

**Author:** ![Psyko2k](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/psyko2k/32/21180_2.png) [@Psyko2k](https://discourse.codecombat.com/u/Psyko2k)\
**Post date:** [February 23, 2021, 1:11am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/22 "2021-02-23T01:11:53Z")

</div>

yep. im completely stumped.

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:13am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/23 "2021-02-23T01:13:27Z")

</div>

how do you die? or lose the level?

---

<div class="post-metadata">

**Author:** ![Psyko2k](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/psyko2k/32/21180_2.png) [@Psyko2k](https://discourse.codecombat.com/u/Psyko2k)\
**Post date:** [February 23, 2021, 1:16am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/24 "2021-02-23T01:16:45Z")

</div>

my character just walks into the nearest mine. (the one with my curser pointing to it)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/1/4/146bfba82e5e8723437b8035020aad35d7f1e8c8.jpeg)

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:22am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/25 "2021-02-23T01:22:49Z")

</div>

hmmmm maybe you dont have enought health? or maybe your taking the short way around?

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:24am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/26 "2021-02-23T01:24:18Z")

</div>

and why is the hero targeting the farthest item he can see?

---

<div class="post-metadata">

**Author:** ![CocoCharlie](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cococharlie/32/19081_2.png) [@CocoCharlie](https://discourse.codecombat.com/u/CocoCharlie)\
**Post date:** [February 23, 2021, 1:24am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/27 "2021-02-23T01:24:51Z")

</div>

Wow, I looked back, and discovered that I had used XY coordinates. So I’m no help. lol

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:26am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/28 "2021-02-23T01:26:38Z")

</div>

Cheddar, your not supposed to take any damage in this level. I even tried Psyko’s code and got the same result.

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:27am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/29 "2021-02-23T01:27:59Z")

</div>

> [@cheddarcheese](#):
>
> and why is the hero targeting the farthest item he can see?

ahem did you see this?

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:30am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/30 "2021-02-23T01:30:34Z")

</div>

Yeah I did @Psyko2k maybe look in your console.

---

<div class="post-metadata">

**Author:** ![Psyko2k](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/psyko2k/32/21180_2.png) [@Psyko2k](https://discourse.codecombat.com/u/Psyko2k)\
**Post date:** [February 23, 2021, 1:30am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/31 "2021-02-23T01:30:35Z")

</div>

sorry, my kid woke up.  
what do you mean?

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:32am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/32 "2021-02-23T01:32:00Z")

</div>

Nervermind what I said.

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [February 23, 2021, 1:33am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/33 "2021-02-23T01:33:24Z")

</div>

well you see that coin that i circled with a markerwith the red shadow? the means the hero is trying to get to that item or place which is what I mean by why is the hero trying to get the farthest coin

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:34am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/34 "2021-02-23T01:34:11Z")

</div>

I know I know no need to explain.  
Maybe it’s because of those glasses probably not though.

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:36am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/35 "2021-02-23T01:36:57Z")

</div>

To be honest I think until Chaboi comes, just use direct link to access the next level.

---

<div class="post-metadata">

**Author:** ![Psyko2k](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/psyko2k/32/21180_2.png) [@Psyko2k](https://discourse.codecombat.com/u/Psyko2k)\
**Post date:** [February 23, 2021, 1:39am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/36 "2021-02-23T01:39:26Z")

</div>

omg. it was a typo…  
im an idiot.

```python
nearestDistace = distance

```

should be…

```python
nearestDistance = distance

```

thanks so much guys for looking. sorry for wasting time. as i said earlier. i’m an idiot lol.

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [February 23, 2021, 1:40am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/37 "2021-02-23T01:40:56Z")

</div>

It’s fine, I didn’t even notice that. The thing with programing is you have to get every letter correct.

---

<div class="post-metadata">

**Author:** ![Psyko2k](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/psyko2k/32/21180_2.png) [@Psyko2k](https://discourse.codecombat.com/u/Psyko2k)\
**Post date:** [February 23, 2021, 1:42am UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/38 "2021-02-23T01:42:45Z")

</div>

i know right.  
2 hours because of a typo lol.

thank god i dont do this for a job 😂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a9445509d1a758c41b5ddcddc8c8e20a5dedb67f.png) [@system](https://discourse.codecombat.com/u/system)\
**Post date:** [February 23, 2021, 1:43pm UTC](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579/39 "2021-02-23T13:43:23Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.codecombat.com/t/sand-snakes-python-these-levels-are-throwing-me-for-a-loop-solved/27579.md?page=1)
