Stuck in 6.practice makes perfect


#1



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


It says by_three(3) returned 1 instead of 27


def cube(number):
    return number*number*number
cube(2)

def by_three(number):
    if number%3 == 0:
        return number/3
    else:
        return False
by_three(27)


#2

this line:

return number/3

you are doing the exact opposite of what is required. from the instructions:

if that number is divisible by 3, by_three should call cube(number) and return its result

you need to return cube(number)


#3

Ohhh, thank you very much.