yordan_yordanov

кода

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