My code isn't working despite the correct code


#1


https://www.codecademy.com/en/courses/python-beginner-c7VZg/1/5?curriculum_id=4f89dab3d788890003000096#


My code looks fine, but it wont work. Where am I going wrong?


Replace this line with your code. Do not remove the backticks that are above or below this line.

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


#2

hi its maybe a indent problem try it like that

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

#3

Is the exercise telling you more than that? Maybe an error message is visible?


#4

It turns out it was an indentation problem. Thanks for your help!