Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month = input()
- hours = int(input())
- people = int(input())
- day_time = input()
- spring = ['march', 'april', 'may']
- summer = ['june', 'july', 'august']
- spring_price = {'day': 10.50, 'night': 8.40}
- summer_price = {'day': 12.60, 'night': 10.20}
- price_per_hour = 0
- if month in spring and day_time in spring_price:
- price_per_hour = spring_price.get(day_time)
- elif month in summer and day_time in summer_price:
- price_per_hour = summer_price.get(day_time)
- if people >= 4:
- price_per_hour *= 0.90
- if hours >= 5:
- price_per_hour *= 0.50
- total = hours * price_per_hour * people
- print(f'Price per person for one hour: {price_per_hour:.2f}')
- print(f'Total cost of the visit: {total:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement