Advertisement
AnitaAntonova

Hotel room

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