Advertisement
George_Ivanov05

07

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