Advertisement
GeorgiLukanov87

ski trip 100/100

Mar 15th, 2022
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.50 KB | None | 0 0
  1. SKI TRIP
  2. ------------------
  3. ------------------
  4.  
  5. days = int(input())
  6. type_room = input()
  7. rate = input()
  8. days = days-1
  9. total_sum = None
  10.  
  11. if type_room == "apartment":
  12.     total_sum = days * 25
  13. elif type_room == "president apartment":
  14.     total_sum = days * 35
  15. elif type_room == "room for one person":
  16.     total_sum = days * 18
  17.  
  18. if days < 10 and type_room == "apartment":
  19.     total_sum = (days * 25)-(days * 25)*0.30
  20. elif 10 <= days <= 15 and type_room == "apartment":
  21.     total_sum = (days * 25)-(days * 25)*0.35
  22. elif days > 15 and type_room == 'apartment':
  23.     total_sum = (days * 25) - (days * 25) * 0.50
  24.  
  25. if days < 10 and type_room == "president apartment":
  26.     total_sum = (days * 35)-(days * 35)*0.10
  27. elif 10 <= days <= 15 and type_room == "president apartment":
  28.     total_sum = (days * 35)-(days * 35)*0.15
  29. elif days > 15 and type_room == 'president apartment':
  30.     total_sum = (days * 35) - (days * 35) * 0.20
  31.  
  32. if rate == "positive" and type_room == "apartment":
  33.     total_sum += total_sum*0.25
  34. elif rate == "negative" and type_room == 'apartment':
  35.     total_sum -= total_sum*0.10
  36. elif rate == "positive" and type_room == "president apartment":
  37.     total_sum += total_sum*0.25
  38. elif rate == "negative" and type_room == 'president apartment':
  39.     total_sum -= total_sum*0.10
  40. if rate == "positive" and type_room == "room for one person":
  41.     total_sum += total_sum*0.25
  42. elif rate == "negative" and type_room == 'room for one person':
  43.     total_sum -= total_sum*0.10
  44.  
  45. print(f"{total_sum:.2f}")
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement