BbJLeB

02. Small Shop

May 7th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.38 KB | None | 0 0
  1. product = input()
  2. city = input()
  3. quantity = float(input())
  4. price = 0
  5.  
  6. if city == "Sofia":
  7.     if product == "coffee":
  8.         price = quantity * 0.50
  9.         print(price)
  10.     elif product == "water":
  11.         price = quantity * 0.80
  12.         print(price)
  13.     elif product == "beer":
  14.         price = quantity * 1.2
  15.         print(price)
  16.     elif product == "sweets":
  17.         price = quantity * 1.45
  18.         print(price)
  19.     elif product == "peanuts":
  20.         price = quantity * 1.60
  21.         print(price)
  22. if city == "Plovdiv":
  23.     if product == "coffee":
  24.         price = quantity * 0.40
  25.         print(price)
  26.     elif product == "water":
  27.         price = quantity * 0.70
  28.         print(price)
  29.     elif product == "beer":
  30.         price = quantity * 1.15
  31.         print(price)
  32.     elif product == "sweets":
  33.         price = quantity * 1.30
  34.         print(price)
  35.     elif product == "peanuts":
  36.         price = quantity * 1.50
  37.         print(price)
  38. if city == "Varna":
  39.     if product == "coffee":
  40.         price = quantity * 0.45
  41.         print(price)
  42.     elif product == "water":
  43.         price = quantity * 0.70
  44.         print(price)
  45.     elif product == "beer":
  46.         price = quantity * 1.10
  47.         print(price)
  48.     elif product == "sweets":
  49.         price = quantity * 1.35
  50.         print(price)
  51.     elif product == "peanuts":
  52.         price = quantity * 1.55
  53.         print(price)
Advertisement
Add Comment
Please, Sign In to add comment