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