Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- meal = raw_input("Cost of meal: ")
- tax = raw_input("Tax: ")
- tip = raw_input("Tip: ")
- def convertInput(meal, tax, tip):
- retMeal = float(meal)
- retTax = float(tax)
- retTip = float(tip)
- return retMeal, retTax, retTip
- def tipCalc(meal, tax, tip):
- retMeal, retTax, retTip = convertInput(meal, tax, tip)
- retTax = retTax / 100
- retTax = retTax * retMeal
- retMeal = retTax + retMeal
- retTip = retTip / 100
- retTip = retTip * retMeal
- total = retMeal + retTip
- print total
- tipCalc(meal, tax, tip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement