Practice makes perfect, Functions #6


#1

def cube(number) :
return "(number**number**number)"

def by_three(number):
if number % 3:
return "by_three(number) + cube(number)"

else :
    return "False"

It returns the statement number**number**number.

Help!


#2

Hi @datarunner71916 ,

You have quotes around all of the values that the functions return, which makes them into strings. For this exercise, the functions should not be returning strings. Instead, you should have the following ...

return number * number * number

...

return cube(number)

... and ...

return False

Note that in the above, some other details of the return statements needed to be changed, as well as the removal of the quotes.

You also need ...

if number % 3 == 0: