Python_Functions_6/19


#1



https://www.codecademy.com/fr/courses/python-beginner-fr-FR-4gcnv/1/5?curriculum_id=5370f030fed2a866a2000001#


Hi Everybody !
My code seems to be correct but it doesn't pass !

def cube(n):
    return n**3
def par_trois(n):
if n % 3 == 0:
    return cube(n)
else:
    return False

Oups, merci de réessayer. Avez-vous créé une fonction "par_trois"? 
And in the console :

**File "python", line 4**
**    if n % 3 == 0:**
**     ^IndentationError: expected an indented block**


#2

Hi you should indent the if and else statement in the function par_trois like that

def par_trois(n):
    if n % 3 == 0:
        return cube(n)
    else:
        return False

#3

Thanks a lot Wizmarco ! It works !