Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- accommodation = input()
- feedback = input()
- nights = days - 1
- if accommodation == "room for one person":
- discounted_price = nights * 18
- elif accommodation == "apartment":
- if days < 10:
- discount = 0.3
- discounted_price = (nights * 25) * (1 - discount)
- elif 10 <= days <= 15:
- discount = 0.35
- discounted_price = (nights * 25) * (1 - discount)
- elif 15 < days:
- discount = 0.5
- discounted_price = (nights * 25) * (1 - discount)
- elif accommodation == "president apartment":
- if days < 10:
- discount = 0.1
- discounted_price = (nights * 35) * (1 - discount)
- elif 10 <= days <= 15:
- discount = 0.15
- discounted_price = (nights * 35) * (1 - discount)
- elif 15 < days:
- discount = 0.2
- discounted_price = (nights * 35) * (1 - discount)
- if feedback == "positive":
- total_price = discounted_price * (1 + 0.25)
- elif feedback == "negative":
- total_price = discounted_price * (1 - 0.1)
- print(f"{total_price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment