Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month = input()
- number_of_nights = int(input())
- cost_for_apartment = 0
- cost_for_studio = 0
- if month == 'May' or month == 'October':
- cost_for_apartment = 65 * number_of_nights
- cost_for_studio = 50 * number_of_nights
- if 7 < number_of_nights <= 14:
- cost_for_studio = cost_for_studio * 0.95
- if number_of_nights > 14:
- cost_for_studio -= cost_for_studio * 0.30
- cost_for_apartment -= cost_for_apartment * 0.10
- elif month == 'June' or month == 'September':
- cost_for_studio = 75.20 * number_of_nights
- cost_for_apartment = 68.70 * number_of_nights
- if number_of_nights > 14:
- cost_for_studio -= cost_for_studio * 0.20
- cost_for_apartment -= cost_for_apartment * 0.10
- elif month == 'July' or month == 'August':
- cost_for_studio = 76 * number_of_nights
- cost_for_apartment = 77 * number_of_nights
- if number_of_nights > 14:
- cost_for_apartment -= cost_for_apartment * 0.10
- print(f'Apartment: {cost_for_apartment:.2f} lv.')
- print(f'Studio: {cost_for_studio:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement