Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- type = input()
- estimation = input()
- price = 0
- if days < 10:
- if type == 'room for one person':
- price = (days-1) * 18
- elif type =='apartment':
- price = (days - 1) * 25
- price = price - (price*0.25)
- elif type == 'president apartment':
- price = (days - 1) * 35
- price = price - (price * 0.10)
- elif days >= 10 and days < 15:
- if type == 'room for one person':
- price = (days-1) * 18
- elif type =='apartment':
- price = (days - 1) * 25
- price = price - (price*0.35)
- elif type == 'president apartment':
- price = (days - 1) * 35
- price = price - (price * 0.15)
- elif days >= 15:
- if type == 'room for one person':
- price = (days-1) * 18
- elif type =='apartment':
- price = (days - 1) * 25
- price = price - (price*0.50)
- elif type == 'president apartment':
- price = (days - 1) * 35
- price = price - (price * 0.20)
- if estimation == 'positive':
- price = price + (price*0.25)
- else:
- price = price - (price*0.10)
- print(f'{price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement