Line 6


it says invalid syntax on line 6 help

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


This is an infinite loop. Do not call the function from within the function. Just return the number cubed.

return number ** 3


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