Sichanov

hotel room

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