Sichanov

fff

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