Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nameOfCity = input()
- typeOfPack = input()
- discount = input()
- dayToStay = int(input())
- totalPrice = 0
- if dayToStay > 7:
- dayToStay = dayToStay - 1
- if nameOfCity == 'Bansko' or nameOfCity == 'Borovets':
- if typeOfPack == 'noEquipment':
- if discount == 'yes':
- totalPrice = (80 - (80 * 0.05)) * dayToStay
- else: totalPrice = 80 * dayToStay
- if typeOfPack == 'withEquipment':
- if discount == 'yes':
- totalPrice = (100 - (100 * 0.10)) * dayToStay
- else: totalPrice = 100 * dayToStay
- if nameOfCity == 'Varna' or nameOfCity == 'Burgas':
- if typeOfPack == 'noBreakfast':
- if discount == 'yes':
- totalPrice = (100 - (100 * 0.07)) * dayToStay
- else: totalPrice = 100 * dayToStay
- if typeOfPack == 'withBreakfast':
- if discount == 'yes':
- totalPrice = (130 - (130 * 0.12)) * dayToStay
- else: totalPrice = 130 * dayToStay
- if nameOfCity == 'Bansko' or nameOfCity == 'Borovets' or nameOfCity == 'Burgas' or nameOfCity == 'Varna':
- if typeOfPack == 'withEquipment' or typeOfPack == 'noEquipment' or typeOfPack == 'withBreakfast' or typeOfPack == 'noBreakfast':
- if dayToStay > 1:
- print(f'The price is {totalPrice:.2f}lv! Have a nice time!')
- else: print('Days must be positive number!')
- else:print(f'Invalid input!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement