What's wrong with my code. could someone pls help me


python - functions - 6/19 practice makes perfect

Oops, try again. Your code looks a bit off. Check the console window for errors!

def cube(number):
    result = number**3
    return result

def by_three(number):
if number % 3 == 0 :
    return false


You use improper indentation. Your by_three() function should look like this:

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


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