Problem


#1

def cube(number):
    number = number ** 3
    print "Cube for this number is %d" %number
    return number
def by_three(number):
    if number/3 == 0:
        new_number = number/3
        return cube(number)
        print "Result of the number %d" %new_number
    else:
        return False
cube(20)

My code is not entering into the second function. Kindly help


#2

Which particular exercise is this?

Well, it is not entering the second function, because there is no call to the second function anywhere


#3

Thanks man..!!! Yeah the problem was, I am using division function instead of Mod. And the second one is I was not calling the second function. Got it.


#4

How about calling the function? :slightly_smiling:

by_three(12) (just an example)


#5

Yes it worked, Thanks