Advertisement
veronikaaa86

09. Ski Trip

May 22nd, 2022
1,213
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. days = int(input())
  2. type_room = input()
  3. assessment = input()
  4.  
  5. nights = days - 1
  6. expenses = 0
  7. if type_room == "room for one person":
  8.     expenses = 18 * nights
  9. elif type_room == "apartment":
  10.     expenses = 25 * nights
  11.     if days < 10:
  12.         expenses = expenses * 0.70
  13.     elif 10 <= days <= 15:
  14.         expenses = expenses * 0.65
  15.     else:
  16.         expenses = expenses * 0.50
  17. elif type_room == "president apartment":
  18.     expenses = 35 * nights
  19.     if days < 10:
  20.         expenses = expenses * 0.90
  21.     elif 10 <= days <= 15:
  22.         expenses = expenses * 0.85
  23.     else:
  24.         expenses = expenses * 0.80
  25.  
  26. if assessment == "positive":
  27.     expenses = expenses * 1.25
  28. else:
  29.     expenses = expenses * 0.90
  30.  
  31. print(f"{expenses:.2f}")
  32.  
Advertisement
RAW Paste Data Copied
Advertisement