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