Sichanov

vv

Jan 26th, 2021
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. count_days = int(input())
  2. type_room = input()
  3. review = input()
  4. count_nights = count_days - 1
  5. price = 0
  6. if type_room == 'room for one person':
  7.     price = count_nights * 18.00
  8. elif type_room == 'apartment':
  9.     price = count_nights * 25.00
  10.     if count_days < 10:
  11.         price -= price * 0.3
  12.     elif 10 <= count_days <= 15:
  13.         price -= price * 0.35
  14.     elif count_days > 15:
  15.         price -= price * 0.50
  16. elif type_room == 'president apartment':
  17.     price = count_nights * 35.00
  18.     if count_days < 10:
  19.         price -= price * 0.10
  20.     elif 10 <= count_days <= 15:
  21.         price -= price * 0.15
  22.     elif count_days > 15:
  23.         price -= price * 0.20
  24.  
  25. if review == 'positive':
  26.     price += price * 0.25
  27. else:
  28.     price -= price * 0.10
  29.  
  30. print(f'{price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment