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