desislava_topuzakova

05. Small Shop

Feb 21st, 2021
672
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # продукт, град, броя на продуктите
  2. # крайна цена = бр. продуктите * цена за 1 продукт
  3.  
  4. product = input()
  5. town = input()
  6. count = float(input())
  7.  
  8. price_per_product = 0
  9.  
  10. if town == "Sofia":
  11.     if product == "coffee":
  12.         price_per_product = 0.50
  13.     elif product == "water":
  14.         price_per_product = 0.80
  15.     elif product == "beer":
  16.         price_per_product = 1.20
  17.     elif product == "sweets":
  18.         price_per_product = 1.45
  19.     elif product == "peanuts":
  20.         price_per_product = 1.60
  21. elif town == "Plovdiv":
  22.     if product == "coffee":
  23.         price_per_product = 0.40
  24.     elif product == "water":
  25.         price_per_product = 0.70
  26.     elif product == "beer":
  27.         price_per_product = 1.15
  28.     elif product == "sweets":
  29.         price_per_product = 1.30
  30.     elif product == "peanuts":
  31.         price_per_product = 1.50
  32. elif town == "Varna":
  33.     if product == "coffee":
  34.         price_per_product = 0.45
  35.     elif product == "water":
  36.         price_per_product = 0.70
  37.     elif product == "beer":
  38.         price_per_product = 1.10
  39.     elif product == "sweets":
  40.         price_per_product = 1.35
  41.     elif product == "peanuts":
  42.         price_per_product = 1.55
  43.  
  44.  
  45. final_price = count * price_per_product
  46. print(final_price)
RAW Paste Data