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


#1

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

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

`


#2

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.


#3

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