Webpage keeps giving me an error. 6/19


As far as I am aware this code is correct but the webpage keeps giving me an error message. I tried to refresh the webpage but that didn't help either.

File "python", line 3
return number**3
IndentationError: expected an indented block
(Roof indication is under the n of return)

def cube(number):

return number**3

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


this line:

return number**3

is wrongly indented, it should be inside the function so it should have 4 spaces at the beginning


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