Advertisement
ossipee

Untitled

Aug 11th, 2015
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def tax(bill):
  2.     """Adds 8% tax to a restaurant bill."""
  3.     bill *= 1.08
  4.     print "With tax: %f" % bill
  5.     return bill
  6.  
  7. def tip(bill):
  8.     """Adds 15% tip to a restaurant bill."""
  9.     bill *= 1.15
  10.     print "With tip: %f" % bill
  11.     return bill
  12.    
  13. meal_cost = 100
  14. meal_with_tax = tax(meal_cost)
  15. meal_with_tip = tip(meal_with_tax)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement