Practice makes perfect(where is the error?!)


#1

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

Oops, try again. by_three(3) returned 3 instead of 27


#2

Hello, @terarockstar62850!
It seems that your code is correct. I've tested it and got the correct output.
Here's the screenshot of it:


Try refreshing the page and executing again, the site's program that is used to compile and execute our codes bugs every now and then.

Quote me if there's anything else I can help you with!

Best regards,
g4be


#3

I got some indentation mixed up :stuck_out_tongue: thanks for the assurance!


#4

No problem! :slightly_smiling: