I have a Python code like this,
def cube(n):
n = n * n * n
return n
def by_three(n):
if (n % 3 == 0):
print "number is divisible by three"
cube(n)
return n
else:
print "number is not divisible by three"
return False
Currently I am not able to return any value, please let me know what is the issue?
cube(), you can simply saydef cube(n): return n ** 3