[Tutor] RuntimeError: maximum recursion depth exceeded

2012-04-19 Thread James Stauble
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.



 #This function defines the main calls in this program
def main():
mealPrice = getMeal()  #call to get the meal price before tip and tax
tipPercent = getTip(mealPrice)  #call to get the total tip based on
meal price
stateTax = getTax(mealPrice)#call to get the total tax based on
meal price
mealTotal = getTotal(mealPrice,tipPercent,stateTax) #call to get the
total cost including tip and tax
#This function gets the original meal price before tax and tip are added
def getMeal():
mealPrice = input ('Enter the price of the meal $ ')
mealPrice = float (mealPrice)
return mealPrice
#This function gets the tip which will be added to the meal
def getTip(mealPrice):
tipPercent = getTip(mealPrice)
if mealPrice >= 25.01:
tipPercent == .22
elif mealPrice >= 17.01:
tipPercent == .19
elif mealPrice >= 12.01:
tipPercent == .16
elif mealPrice >= 6:
tipPercent == .13
else:
tipPercent == .10
return tipPercent
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Thanks Everyone!!!

2012-04-19 Thread James Stauble
Thanks for the tips everyone! I am fairly new to programming and am finding
myself both bewildered and amazed. Its fun when it works, but boy oh boy,
when it doesn't
Anyway thanks again, you all have been very helpful. [?]
<<330.gif>>___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor