What is wrong?


#1

def cube(number):
return cube(number)
def by_three(number):
if number % 3 == 0:
return "n is divisible by 3"
else:
return "n is not"


#2

What are you trying to do here?


#3

Instead of adding call to the function from within the function, you should perform the mathematical operation that will raise the number to the power of three, which is to cube the number. Return that result.


#4

def cube(number):
return number**3

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

cube(5)

Dont know what the problem is.The compiler returns
Oops, try again. by_three(1) returned 'False' instead of False

P.S I HAVE DONE THE INDENTING


#5

It tells you exactly what the problem is. READ THE ERROR MESSAGE. It says:

"You returned 'False' instead of False"

#6

can you be more specific I do not understand what you are trying to say.If possible can you give me the code for this particular exercise?\

Thanks in advance


#7

HI like @cadecodes said you should return False without " " around False.


#8

Thank you it worked :slightly_smiling: