Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- type = input()
- opinion = input()
- price = 0
- price1 = 0
- if type == 'room for one person':
- if opinion == 'positive':
- price = (days - 1) * 18 * 1.25
- elif opinion == 'negative':
- price = (days - 1) * 18 * 0.9
- elif type == 'apartment':
- if opinion == 'positive':
- if days <= 10:
- price1 = 25 * 0.7
- elif 10 < days <= 15:
- price1 = 25 * 0.65
- elif days > 15:
- price1 = 25 * 0.5
- price = (days - 1) * price1 * 1.25
- elif opinion == 'negative':
- if days <= 10:
- price1 = 25 * 0.7
- elif 10 < days <= 15:
- price1 = 25 * 0.65
- elif days > 15:
- price1 = 25 * 0.5
- price = (days - 1) * price1 * 0.9
- elif type == 'president apartment':
- if opinion == 'positive':
- if days <= 10:
- price1 = 35 * 0.9
- elif 10 < days <= 15:
- price1 = 35 * 0.85
- elif days > 15:
- price1 = 35 * 0.8
- price = (days - 1) * price1 * 1.25
- elif opinion == 'negative':
- if days <= 10:
- price1 = 35 * 0.9
- elif 10 < days <= 15:
- price1 = 35 * 0.85
- elif days > 15:
- price1 = 35 * 0.8
- price = (days - 1) * price1 * 0.9
- print(f'{price:.2f}')
Add Comment
Please, Sign In to add comment