Practice Makes Perfect


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

this is my code, and it always output "NONE", but shouldn't the "by_three(3)" result 27? 
anyhelp will be appreciated, thank you~

Replace this line with your code.


This looks like it is still in the function block. Remove indentation.


2 posts were split to a new topic: Practice makes perfect


A post was merged into an existing topic: Practice makes perfect


You don't have any print commands so it won't display the outouts.