6. Practice Makes Perfect Bug


#1



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

I think my code is right but it doesn't work. It keeps on saying this error message:
Oops, try again. by_three(3) returned True instead of 27


def cube(number):
    return number ** 3

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


#2

you must check if number (not cube of number) is divisible by 3, if it is, return the result of calling cube on number (not True)


#3

Ohhhh, thanks a lot. Now I can complete this lesson. Thank you very much!


#4