Help I don't understand the instructions


#1

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


#2

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)


#3

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