Sichanov

hotel room

May 15th, 2021
131
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. number_of_nights = int(input())
  3. studio_price = 0
  4. apartment_price = 0
  5. if month == 'May' or month == 'October':
  6.     studio_price = 50 * number_of_nights
  7.     apartment_price = 65 * number_of_nights
  8.     if 7 < number_of_nights <= 14:
  9.         studio_price *= 0.95
  10.     elif number_of_nights > 14:
  11.         studio_price *= 0.70
  12. elif month == 'June' or month == 'September':
  13.     studio_price = 75.20 * number_of_nights
  14.     apartment_price = 68.70 * number_of_nights
  15.     if number_of_nights > 14:
  16.         studio_price *= 0.80
  17. elif month == 'July' or month == 'August':
  18.     studio_price = 76 * number_of_nights
  19.     apartment_price = 77 * number_of_nights
  20. if number_of_nights > 14:
  21.     apartment_price *= 0.90
  22. print(f'Apartment: {apartment_price:.2f} lv.')
  23. print(f'Studio: {studio_price:.2f} lv.')
  24.  
Advertisement
Add Comment
Please, Sign In to add comment