Sichanov

small shop

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