simeonshopov

Small Shop

Sep 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. item = input().lower()
  2. town = input().lower()
  3. quantity = float(input())
  4.  
  5. if town == "sofia":
  6.   if item == "coffee":
  7.     print(quantity * 0.50)
  8.   elif item == "water":
  9.     print(quantity * 0.80)
  10.   elif item == "beer":
  11.     print(quantity * 1.20)
  12.   elif item == "sweets":
  13.     print(quantity * 1.45)
  14.   elif item == "peanuts":
  15.     print(quantity * 1.60)
  16.    
  17. if town == "plovdiv":
  18.   if item == "coffee":
  19.     print(quantity * 0.40)
  20.   elif item == "water":
  21.     print(quantity * 0.70)
  22.   elif item == "beer":
  23.     print(quantity * 1.15)
  24.   elif item == "sweets":
  25.     print(quantity * 1.30)
  26.   elif item == "peanuts":
  27.     print(quantity * 1.50)
  28.  
  29. if town == "varna":
  30.   if item == "coffee":
  31.     print(quantity * 0.45)
  32.   elif item == "water":
  33.     print(quantity * 0.70)
  34.   elif item == "beer":
  35.     print(quantity * 1.10)
  36.   elif item == "sweets":
  37.     print(quantity * 1.35)
  38.   elif item == "peanuts":
  39.     print(quantity * 1.55)
Add Comment
Please, Sign In to add comment