Help


#1



https://www.codecademy.com/courses/python-beginner-c7VZg/1/5?curriculum_id=4f89dab3d788890003000096

The message that pops up says it cube(2) = 4 instead of 8. what am i doig wrong


def cube(number):
    return number ** number
    
def by_three(number) :
    if number % 3 == 0:
        return number ** 3
    else: 
        return False


#2

your cube function returns the number square number (math notation: number ^ number) it should return the cube of number (number ^ 3 in math notation)


#3

Ohhh ok so it should look like this?
def cube(number):
return number ** 3

def by_three(number) :
if number % 3 == 0:
return cube(n)
else:
return False


#4

nearly, here:

return cube(n)

where n come from?


#5

i ment number instead of n


#6

Then it should all be good :slight_smile:


#7

thank you so much for your help!


#8