Advertisement
GalinaKG

Untitled

May 5th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. month = input()
  2. count_nights = int(input())
  3. studio = 0
  4. apartment = 0
  5.  
  6. if month == 'May' or month == 'October':
  7. studio = count_nights * 50
  8. apartment = count_nights * 65
  9. if count_nights > 14:
  10. studio -= (studio * 0.30)
  11. apartment -= (apartment * 0.10)
  12. elif count_nights > 7:
  13. studio -= (studio * 0.05)
  14. elif month == 'June' or month == 'September':
  15. studio = count_nights * 75.20
  16. apartment = count_nights * 68.70
  17. if count_nights > 14:
  18. studio -= (studio * 0.20)
  19. apartment -= (apartment * 0.10)
  20. else:
  21. studio = count_nights * 76
  22. apartment = count_nights * 77
  23. if count_nights > 14:
  24. apartment -= (apartment * 0.10)
  25.  
  26. print(f"Apartment: {apartment:.2f} lv.")
  27. print(f"Studio: {studio:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement