Advertisement
mbstanchev

Hotel room

Jan 24th, 2022
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. month = input()
  2. num_of_nights = int(input())
  3.  
  4. type_of_room = ""
  5. cost_studio = 0
  6. cost_apartment = 0
  7.  
  8. if month == "May" or month == "October":
  9. if num_of_nights > 14:
  10. type_of_room = "Apartment"
  11. cost_apartment = num_of_nights * 65 * 0.9
  12. else:
  13. type_of_room = "Apartment"
  14. cost_apartment = num_of_nights * 65
  15. if 14 > num_of_nights > 7:
  16. type_of_room = "Studio"
  17. cost_studio = (num_of_nights * 50) * 0.95
  18. elif num_of_nights > 14:
  19. type_of_room = "Studio"
  20. cost_studio = (num_of_nights * 50) * 0.7
  21. else:
  22. type_of_room = "Studio"
  23. cost_studio = (num_of_nights * 50)
  24.  
  25. elif month == "June" or month == "September ":
  26. if num_of_nights > 14:
  27. type_of_room = "Apartment"
  28. cost_apartment = num_of_nights * 68.7 * 0.9
  29. else:
  30. type_of_room = "Apartment"
  31. cost_apartment = num_of_nights * 68.7
  32. if num_of_nights > 14:
  33. type_of_room = "Studio"
  34. cost_studio = (num_of_nights * 75.20) * 0.8
  35. else:
  36. type_of_room = "Studio"
  37. cost_studio = (num_of_nights * 75.20)
  38.  
  39. elif month == "July" or month == "August":
  40. if num_of_nights > 14:
  41. type_of_room = "Apartment"
  42. cost_apartment = num_of_nights * 77 * 0.9
  43. else:
  44. type_of_room = "Apartment"
  45. cost_apartment = num_of_nights * 77
  46. if num_of_nights >=1:
  47. type_of_room_of_room = "Studio"
  48. cost_studio = num_of_nights * 76
  49.  
  50. print(f"Apartment: {cost_apartment:.2f} lv.")
  51. print(f"Studio: {cost_studio:.2f} lv.")
  52.  
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement