# [Solved] Don´t Rush, Be Quiet - [Python Help]

My Hero is Running slowly but at the end he runs a short time to fast and every Cannon is shooting him away. I dont know how to solve that Problem
This is my Code:

``````def mod30(n):
if n >= 30:
return n - 30
else:
return n

def mod40(n):
if n >= 40:
return n
else:
return n

while True:
time = hero.time
x = mod30(time) + 25
y = mod40(time) + 10
hero.moveXY(x, y)

``````

Can you send me a link to this level?

1 Like

Please put three ``` on two lines on your post, the make a line inbetween them and paste in your code directly from codecombat.
Thanks
Danny

1 Like

Now i did. Now i understand that system. Back to my Question please

Here you have to write like in last def:

``````if n >= 40:
return n - 40
``````

The `def mod30(n)` is fine, but for the `def mod40(n)` just copy and paste the mod30(n) to where the mod40(n) should be and change all of the 30 to 40 in `def mod40(n)`
Lydia

4 Likes

Thank you for helping me out
It works. What 3 letters and Numbers can make xD

1 Like

Congratulations!

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