Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- town = input().lower()
- product = input().lower()
- quantify = float(input())
- price = -1.0
- if town == 'Sofia':
- if product == 'coffee':
- price = 0.5 * quantify
- elif product == 'water':
- price = 0.8 * quantify
- elif product == 'beer':
- price = 1.20 * quantify
- elif product == 'sweets':
- price = 1.45 * quantify
- elif product == 'peanuts':
- price = 1.60 * quantify
- elif town == 'Plovdiv':
- if product == 'coffee':
- price = 0.40 * quantify
- elif product == 'water':
- price = 0.70 * quantify
- elif product == 'beer':
- price = 1.15 * quantify
- elif product == 'sweets':
- price = 1.30 * quantify
- elif product == 'peanuts':
- price = 1.50 * quantify
- elif town == 'Varna':
- if product == 'coffee':
- price = 0.45 * quantify
- elif product == 'water':
- price = 0.70 * quantify
- elif product == 'beer':
- price = 1.10 * quantify
- elif product == 'sweets':
- price = 1.35 * quantify
- elif product == 'peanuts':
- price = 1.55 * quantify
- print("{0:.2f}".format(price))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement