Advertisement
Andonoff

07. Hotel Room

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