Why would this have worked? (Practice Makes Perfect)


#1

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

No idea how or why but this seemed to have done the trick… I have put double bolded the part in question. Thanks for any answers!


#2

you return the result of calling another function, so cube() returns, well, the cube of number. by_three returns this result if number is divisible by 3


#3

Okay thanks for the answer!


#4