Practice Makes Perfect


#1

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

  • It wrong, please help me why ?

#2


#3

Do you mean, number ** 3 ?


#4

Oh no..!!
Thanks very much!!!