SHOW:
|
|
- or go back to the newest paste.
| 1 | product = input() | |
| 2 | city = input() | |
| 3 | quantity = float(input()) | |
| 4 | price = 0 | |
| 5 | ||
| 6 | if city == "Sofia": | |
| 7 | if product == "coffee": | |
| 8 | price = 0.5 | |
| 9 | elif product == "water": | |
| 10 | price = 0.8 | |
| 11 | elif product == "beer": | |
| 12 | price = 1.2 | |
| 13 | elif product == "sweets": | |
| 14 | price = 1.45 | |
| 15 | elif product == "peanuts": | |
| 16 | price = 1.6 | |
| 17 | ||
| 18 | elif city == "Plovdiv": | |
| 19 | if product == "coffee": | |
| 20 | price = 0.4 | |
| 21 | elif product == "water": | |
| 22 | price = 0.7 | |
| 23 | elif product == "beer": | |
| 24 | price = 1.15 | |
| 25 | elif product == "sweets": | |
| 26 | price = 1.30 | |
| 27 | elif product == "peanuts": | |
| 28 | price = 1.50 | |
| 29 | ||
| 30 | elif city == "Varna": | |
| 31 | if product == "coffee": | |
| 32 | price = 0.45 | |
| 33 | elif product == "water": | |
| 34 | price = 0.7 | |
| 35 | elif product == "beer": | |
| 36 | price = 1.10 | |
| 37 | elif product == "sweets": | |
| 38 | price = 1.35 | |
| 39 | elif product == "peanuts": | |
| 40 | price = 1.55 | |
| 41 | ||
| 42 | price = quantity * price | |
| 43 | ||
| 44 | print(price) |