DiYane

Ski trip / 13/5

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