6/19 - how do i make it return if or else result?

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

This code passes but the result is only "none" and not cube of number or false. I tried raw_input, input() in all possible places but it won't work. Even if i try to put number = 3 it won't work. Any other method? Am i missing something?

Got Ya!

If you want to see the number cubed, you need to use print instead.


No, the function should not print anything.
Instead call the function and print the result


print by_three(x)?


...but how? don't you still use print? code by jibblyj works.