I’m on the level 'The Mighty Sand Yak (1st level in the desert). I used a rather easy-to-do method to avoid all the yaks (by moving the avatar using moveXY instead of proximity. Even though I avoided all yaks, I am unable to submit the python code.
The code goes like this-
Let yaks get close, then move 10m right to dodge.
Dodge 4 yaks to complete the level.
loop:
# Use "if" to only move when a yak is less than 10m away.
# Move right by adding to your current X position.
# Use your Sense Stone to access self.pos.
self.moveXY(25, 30)
self.moveXY(35,30)
self.moveXY(45,30)
self.moveXY(55,30)
----------
The purpose of this level is to use if logic to decide when to move, so that’s probably why the level isn’t passing.
The pseudo code is very clear, try giving it a shot:
Use “if” to only move when a yak is less than 10m away.
Move right by adding to your current X position.
Use your Sense Stone to access self.pos.
You’re posting on a topic that’s 5 years old, so the other folk probably aren’t around any more.
Rather than copying code, have a go at writing your own. There’s information in the hints, and sometimes you just have to try things to see if they work. If you’re still stuck, post the code that you’ve done here and we’ll try to help you .
Yeah, the purpose of the discourse is to help not give out answers. Once you write your own code, show it using the </> and we can give some tips
-Rachel