Not able to view the output


#1


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

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)
    else:
        return False
   
cube(9)


#2

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


#3

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


#4

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


#5