Advertisement
rozalina1988

08_Hotel_room

Nov 16th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.09 KB | None | 0 0
  1. month = input()
  2. nights_quantity = int(input())
  3.  
  4. night_in_studio= 0
  5. night_in_app = 0
  6. discount = 1
  7.  
  8.  
  9. if month == "May" or month == "October":
  10.     night_in_studio = 50
  11.     night_in_app = 65
  12.  
  13. elif month == "June" or month == "September":
  14.     night_in_studio = 75.20
  15.     night_in_app = 68.70
  16.  
  17. elif month == "July" or month == "August":
  18.     night_in_studio = 76
  19.     night_in_app = 77
  20.  
  21. if (month == "May" or month == "October") and nights_quantity > 7:
  22.     night_in_studio = night_in_studio * 0.95
  23. if (month == "May" or month == "October") and nights_quantity > 14:
  24.     night_in_studio *= 0.70
  25. if (month == "June" or month == "September") and nights_quantity > 14:
  26.     night_in_studio *= 0.80
  27. if (month == "May" or month == "June" or month == "July"
  28.     or month == "August" or month == "September" or month == "October") and nights_quantity > 14:
  29.     night_in_app *= 0.90
  30.  
  31.  
  32. price_total_stay_app = nights_quantity * night_in_app
  33. price_total_stay_studio = night_in_studio * nights_quantity
  34.  
  35. print(f"Apartment: {price_total_stay_app:.2f} lv.")
  36. print(f"Studio: {price_total_stay_studio:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement