Practice makes perfect


when i run my code this appears
'' File "python", line 7
return cube(number)
^IndentationError: expected an indented block"
i dont whats is wrong with my code,can someone tell me ?

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


You need to indent your return statements inside the if and else statements.


ahh thank u very much!!


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