Advertisement
veronikaaa86

07. Hotel Room

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