Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.30 KB | None | 0 0
  1. product = input()
  2. city = input()
  3. quantity = int(input())
  4.  
  5. if city == "Sofia":
  6.     if product == "coffee":
  7.         price = quantity * 0.5
  8.         if product == "water":
  9.             price = quantity * 0.8
  10.             if product == "beer":
  11.                 price = quantity * 1.2
  12.                 if product == "sweets":
  13.                     price = quantity * 1.45
  14.                     if product == "peanuts":
  15.                         price = quantity * 1.6
  16.  
  17. elif city == "Plovdiv":
  18.     if product == "coffee":
  19.         price = quantity * 0.4
  20.         if product == "water":
  21.             price = quantity * 0.7
  22.             if product == "beer":
  23.                 price = quantity * 1.15
  24.                 if product == "sweets":
  25.                     price = quantity * 1.30
  26.                     if product == "peanuts":
  27.                         price = quantity * 1.50
  28.                        
  29. elif city == "Varna":
  30.     if product == "coffee":
  31.         price = quantity * 0.45
  32.         if product == "water":
  33.             price = quantity * 0.7
  34.             if product == "beer":
  35.                 price = quantity * 1.10
  36.                 if product == "sweets":
  37.                     price = quantity * 1.35
  38.                     if product == "peanuts":
  39.                         price = quantity * 1.55
  40.  
  41. print(price)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement