Advertisement
Kaloyankerr

08. Hotel Room

Aug 8th, 2020
1,960
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. month = input()
  2. nights = int(input())
  3. total_studio_price = 0
  4. total_apartment_price = 0
  5. price_studio = 0
  6. price_apart = 0
  7.  
  8.  
  9. if month == "May" or month == "October":
  10.     price_studio = 50
  11.     price_apart = 65
  12.     if 7 < nights <= 14:
  13.         price_studio = 0.95 * price_studio
  14.     elif nights > 14:
  15.         price_studio = 0.7 * price_studio
  16.         price_apart = 0.9 * price_apart
  17.  
  18. elif month == "June" or month == "September":
  19.     price_studio = 75.20
  20.     price_apart = 68.70
  21.     if nights > 14:
  22.         price_studio = 0.8 * price_studio
  23.         price_apart = 0.9 * price_apart
  24.  
  25. elif month == "July" or month == "August":
  26.     price_studio = 76
  27.     price_apart = 77
  28.     if nights > 14:
  29.         price_apart = 0.9 * price_apart
  30.  
  31. total_apartment_price = nights * price_apart
  32. total_studio_price = nights * price_studio
  33.  
  34. print(f"Apartment: {total_apartment_price:.2f} lv.")
  35. print(f"Studio: {total_studio_price:.2f} lv.")
  36.  
  37. # print("Apartment: " f'{total_apartment_price:.2f}'"lv.")
  38. # print("Studio: " f'{total_studio_price:.2f}'"lv.")
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement