Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month = input()
- nights_to_stay = int(input())
- price_per_studio = 0
- price_per_apartment = 0
- if month == 'May' or month == 'October':
- price_per_studio = nights_to_stay * 50
- price_per_apartment = nights_to_stay * 65
- elif month == 'June' or month == 'September':
- price_per_studio = nights_to_stay * 75.2
- price_per_apartment = nights_to_stay * 68.7
- elif month == 'July' or month == 'August':
- price_per_studio = nights_to_stay * 76
- price_per_apartment = nights_to_stay * 77
- discount_studio = 0
- discount_apartment = 0
- if month == 'May' or month == 'October':
- if 7 < nights_to_stay <= 14:
- discount_studio = price_per_studio * 0.05
- else:
- discount_studio = price_per_studio * 0.3
- discount_apartment = price_per_apartment * 0.1
- elif month == 'June' or month == 'September':
- if nights_to_stay > 14:
- discount_studio = price_per_studio * 0.2
- discount_apartment = price_per_apartment * 0.1
- elif month == 'July' or month == 'August':
- if nights_to_stay > 14:
- discount_apartment = price_per_apartment * 0.1
- total_per_studio = price_per_studio - discount_studio
- total_per_apartment = price_per_apartment - discount_apartment
- print(f'Apartment: {total_per_apartment:.2f} lv.')
- print(f'Studio: {total_per_studio:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement