Practice Makes Perfect


It gives me an error saying "Oops, try again. by_three(3) returned False instead of 27"

I thought i done everything correctly. Please can you help me.

def cube(number):
    cube = number*number*number
    print cube
    return cube 

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



if the number is divisible by 3, you should return the cube, not print it:

return cube(number)


Thank you very much stetim94. It worked when i changed it :wink: