[Tutor] RuntimeError: maximum recursion depth exceeded
Andreas Perstinger
andipersti at gmail.com
Thu Apr 19 22:05:37 CEST 2012
On 2012-04-19 21:51, James Stauble wrote:
> I have seen in a few places where this means my program is essentially in an
> endless loop, but as far as I can see it is formatted correctly. Any help would
> be greatly appreciated. Thanks in advance.
[snip]
> #This function gets the tip which will be added to the meal
> def getTip(mealPrice):
> tipPercent = getTip(mealPrice)
As soon as you enter "getTip()" you immediately call it again and again
and again ... without a chance to break out of this endless loop.
As far as I can tell from your code snippet you don't need the line
tipPercent = getTip(mealPrice)
Bye, Andreas
More information about the Tutor
mailing list