Ddimov90

hotel_room_07_02

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