# [Solved] Don't Rush, be quiet.. Help Me Please

I’ve looked through so many different forums and help pages on this and it continues to tell me that my last line of code is wrong. Please Help

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

# This function should return a value from 0 to 40 (0 <= n < 40)

def mod40(n):
# Use an if-statement to return the correct value.
if n < 40:
return n

# You don’t need to change the following code:

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

welcome to the forum!
please format your code according to the FAQ, by using the </> button here:

Mumbo_6

``````# Dodge the cannons and collect 8 gems.
# Watch out, cannons are ready to fire!
# Move slow along a special pattern to confuse them.

# This function returns a value from 0 to 30 (0 <= n < 30)
def mod30(n):
if n >= 30:
return n - 30
else:
return n

# This function should return a value from 0 to 40 (0 <= n < 40)
def mod40(n):
# Use an if-statement to return the correct value.
if n < 40:
return n

# You don't need to change the following code:
while True:
time = hero.time
x = mod30(time) + 25
y = mod40(time) + 10
hero.moveXY(x, y)

``````

Alright thank you for clarifying that. But I still can’t understand how to complete this. The last line is always having something wrong with it and I don’t understand what it is.

here try to put:

``````if n < 40:
return n - 40
else:
return n
``````

Mumbo_6

It just made my hero start walking off of the bottom of the screen

I saw that. Whats your equipment?

Mumbo_6

Welcome welcome to the forum! It is a lovely place where you can share everything, bugs, and even request help on levels!
Lydia

here put:

``````if n >= 40:
``````

changing all that works for me just fine.

Mumbo_6

My equipment is full obsidian, with engraved obsidian shield, and boots of leaping.

Changing it all worked. thank you

Congrats!!!

now to show that you have the solution u need you will see this button that says solved click that next to the comment that gave u the answer and ill put title to [Solved] so others know they can find an answer here have fun with the other levels!

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