Help I don't understand the instructions


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


There is no need to use the is operator here

to check if a number is divisible by 3 you would write,

number % 3 == 0

Also you only supposed to return cube(number) once and not on two separate lines,

simply be,

return cube(number)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.