Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- room = input()
- rating = input()
- nights = days - 1
- price = 0
- tips = 0
- room_for_one = 18.00 * nights
- apartment = 25.00 * nights
- president_apartment = 35.00 * nights
- if rating == "positive":
- tips = 1.25
- else:
- tips = 0.9
- if nights < 10:
- apartment *= 0.7
- president_apartment *= 0.9
- elif 10 <= nights <= 15:
- apartment *= 0.65
- president_apartment *= 0.85
- else:
- apartment *= 0.5
- president_apartment *= 0.8
- if room == "room for one person":
- price = room_for_one * tips
- elif room == "apartment":
- price = apartment * tips
- else:
- price = president_apartment * tips
- print(f"{price:.2f}")
Add Comment
Please, Sign In to add comment