Advertisement
bl00dt3ars

07. Hotel Room

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