127,378 views
1 vote
1 vote
g Write a recursive program that causes the program to crash. How calls does it take before it crashes

User LavaScornedOven
by
3.0k points

1 Answer

7 votes
7 votes

Answer:

Every recursive function must have a base condition that stops the recursion or else the function calls itself infinitely. The Python interpreter limits the depths of recursion to help avoid infinite recursions, resulting in stack overflows. By default, the maximum depth of recursion is 1000 .

Step-by-step explanation:

User Orodan
by
3.1k points