Need help "cubic mine field"


#1
# Walk through the minefield

# This function returns the number multiplied by the times
def mult(number, times):
    total = 0
    while times > 0:
        total += number
        times -= 1
    return total

# This function returns the number to the exponent power.
def power(number, exponent):
    total = 1
    # Complete the function.
    
    return total

# Don't change the following code
# You can find coefficients for the equation on the tower
tower = hero.findFriends()[0]
a = tower.a
b = tower.b
c = tower.c
d = tower.d
x = hero.pos.x

while True:
    # To find the path use a cubic equation
    y = a * power(x, 3) + b * power(x, 2) + c * power(x, 1) + d * power(x, 0)
    hero.moveXY(x, y)
    x = x + 5

#2

Please format your code accourding to our community guidelines, thank you.


#3

He already did (2000)


#4

He wasn’t then he did.


#5

#Complete the function. return total” do that


#6

im clueless (20 characters)


#7

Can’t tell you the answer.


#8

He’s given you a great hint, try remembering the past experience or read the comments carefully and solve the level :wink:


#9

@Chaboi_3000 wait. I gave a hint? when? I don’t remember…


#10

This is kind of a hint/tip


#11

That’s what the level said. I’m just quoting the level.


#12

And it’s a good tip :wink: