Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days_in_hotel = int(input())
- type_of_room = input()
- evaluation = input()
- positive = 0.25
- negative = 0.10
- nights = days_in_hotel-1
- room_one_person = 0
- apartment = 0
- president_apartment = 0
- if type_of_room == "room for one person":
- room_one_person = nights * 18
- if 15 > nights < 15 and evaluation == "positive":
- print(f"{(room_one_person+(room_one_person * positive)):.2f}")
- elif 15 > nights < 15 and evaluation == "negative":
- print(f"{(room_one_person - (room_one_person * negative)):.2f}")
- elif type_of_room == "apartment":
- apartment = nights * 25 # "apartment" – 25.00 лв за нощувка
- if nights < 10 and evaluation == "positive":
- apartment_discount = apartment - (apartment * 0.30)
- apartment_positive = apartment_discount + (apartment_discount * positive)
- print(f"{apartment_positive:.2f}")
- elif nights < 10 and evaluation == "negative":
- apartment_discount = apartment - (apartment * 0.30)
- apartment_negative = apartment_discount - (apartment_discount * negative)
- print(f"{apartment_negative:.2f}")
- elif 10 <= nights <= 15 and evaluation == "positive":
- apartment_discount = apartment - (apartment * 0.35)
- apartment_negative = apartment_discount + (apartment_discount * positive)
- print(f"{apartment_negative:.2f}")
- elif 10 <= nights <= 15 and evaluation == "negative":
- apartment_discount = apartment - (apartment * 0.35)
- apartment_negative = apartment_discount - (apartment_discount * negative)
- print(f"{apartment_negative:.2f}")
- elif nights > 15 and evaluation == "positive":
- apartment_discount = apartment - (apartment * 0.50)
- apartment_negative = apartment_discount + (apartment_discount * positive)
- print(f"{apartment_negative:.2f}")
- elif nights > 15 and evaluation == "negative":
- apartment_discount = apartment - (apartment * 0.50)
- apartment_negative = apartment_discount - (apartment_discount * negative)
- print(f"{apartment_negative:.2f}")
- elif type_of_room == "president apartment":
- president_apartment = nights * 35 # "president_apartment" – 35.00 лв за нощувка
- if nights < 10 and evaluation == "positive":
- president_apartment_discount = president_apartment - (president_apartment * 0.10)
- president_apartment_positive = president_apartment_discount + (president_apartment_discount * positive)
- print(f"{president_apartment_positive:.2f}")
- elif nights < 10 and evaluation == "negative":
- president_apartment_discount = president_apartment - (president_apartment * 0.10)
- president_apartment_negative = president_apartment_discount - (president_apartment_discount * negative)
- print(f"{president_apartment_negative:.2f}")
- elif 10 <= nights <= 15 and evaluation == "positive":
- president_apartment_discount = president_apartment - (president_apartment * 0.15)
- president_apartment_negative = president_apartment_discount + (president_apartment_discount * positive)
- print(f"{president_apartment_negative:.2f}")
- elif 10 <= nights <= 15 and evaluation == "negative":
- president_apartment_discount = president_apartment - (president_apartment * 0.15)
- president_apartment_negative = president_apartment_discount - (president_apartment_discount * negative)
- print(f"{president_apartment_negative:.2f}")
- elif nights > 15 and evaluation == "positive":
- president_apartment_discount = president_apartment - (president_apartment * 0.20)
- president_apartment_negative = president_apartment_discount + (president_apartment_discount * positive)
- print(f"{president_apartment_negative:.2f}")
- elif nights > 15 and evaluation == "negative":
- president_apartment_discount = president_apartment - (president_apartment * 0.20)
- president_apartment_negative = president_apartment_discount - (president_apartment_discount * negative)
- print(f"{president_apartment_negative:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement