Denis2312

Hotel Room

Mar 24th, 2024 (edited)
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. month = input()
  2. nights = int(input())
  3.  
  4. price = 0
  5.  
  6. if month == "May" or month == "October":
  7.     studio_price = nights * 50
  8.     apartment_price = nights * 65
  9.     if nights > 14:
  10.         apartment_price = apartment_price * 0.9
  11.         studio_price = studio_price * 0.7
  12.     elif nights > 7:
  13.         studio_price = studio_price * 0.95
  14.  
  15. elif month == "June" or month == "September":
  16.     studio_price = nights * 75.2
  17.     apartment_price = nights * 68.7
  18.     if nights > 14:
  19.         studio_price = studio_price * 0.8
  20.  
  21. elif month == "July" or month == "August":
  22.     studio_price = nights * 76
  23.     apartment_price = nights * 77
  24.     if nights > 14:
  25.        apartment_price = apartment_price * 0.9
  26.  
  27. print(f"Apartment: {apartment_price:.2f} lv.")
  28. print(f"Studio: {studio_price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment