I am stuck in the level Zig Zag and Zoom, in the desert, and I just get stuck after the first zig-zag. I don’t understand what is wrong with my code so please help me understand what my error is so I will not make it again. =)
Escape from Death Valley!
Move by with a zigzag pattern using real modulo functions.
This function returns a value from 0 to 15:
while n >= 15:
n -= 15
This function should return a value from 0 to 9:
# While n is greater or equal to 9, subtract 9 from n:
while n > 9:
n = n-9
Don’t change the following code:
time = hero.time
if time < 30:
y = 10 + 3 * mod15(time)
y = 20 + 3 * mod9(time)
x = 10 + time