Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #Calculate the bill
  2. def tax(bill):
  3. """Adds 8% tax to a restaurant bill."""
  4. bill *= 1.08
  5. print ("With tax: %f" % bill)
  6. return bill
  7.  
  8. def tip(bill):
  9. """Adds 15% tip to a restaurant bill."""
  10. bill *= 1.15
  11. print ("With tip: %f" % bill)
  12. return bill
  13.  
  14. meal_cost = 36
  15. meal_with_tax = tax(meal_cost)
  16. meal_with_tip = tip(meal_with_tax)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement