Not able to view the output


It does not include any erros, but throws NONE on my console. What should I do to see the cube of 9 in my console.

It should return 27

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


to print what the function returns add a print statement to the function call


I am not sure if i am following you.
I am writing this and getting error.
print "Cube of %d is %d" % (number, output)


Never mind, I got it. :slight_smile:
print cube(2)
print by_three(4)