Review functions, error: "maximum recursion depth exceeded


Continuing the discussion from 17. Review: Functions:
plz help me with this, this is the first time I spotted this type of error


Every time your program calls a function, it has to remember which place in the code to return to when the function is done.

If you do this too many times, the program runs out of space to remember this information.

Your function calls itself, this is called recursion and is very useful.
But whenever your function is called, it will call itself, which will then call itself which will..
Your program will run out of space for storing this information, you hit the recursion depth limit and your program is forced to terminate.