BdW44222

04. Orders

Jun 9th, 2021
555
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. order_type = input()
  2. order_quantity = int(input())
  3.  
  4.  
  5. def sum_orders(order, quantity):
  6.     result = None
  7.     if order == 'coffee':
  8.         result = float(quantity) * 1.50
  9.     if order == 'water':
  10.         result = float(quantity) * 1.00
  11.     if order == 'coke':
  12.         result = float(quantity) * 1.40
  13.     if order == 'snacks':
  14.         result = float(quantity) * 2.00
  15.     return "%.2f" % result
  16.  
  17.  
  18. print(sum_orders(order_type, order_quantity))
RAW Paste Data