webbersof

Untitled

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