Oops, try again. cube(1) resulted in an error: maximum recursion depth exceeded


I keep getting that error. Here is my code. 7.Functions 6.Practice makes perfect.

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



Not sure what you want to know, there's no question! But I suggest googling your error message.

Also, note that your code is different in your post from what you're running yourself, it would be better to post the exact same code so that it is possible to copy what you've posted, run it, and get the same result as you describe.


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