Why would this have worked? (Practice Makes Perfect)


def cube(number):
return number ** 3
def by_three(number):
if number % 3 == 0:return cube(number)
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!


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


Okay thanks for the answer!