Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month = input()
- hours = int(input())
- people = int(input())
- day_night = input()
- price = 0
- total_cost = 0
- if day_night == 'day' and month in ['march', 'april', 'may']:
- price = 10.5
- if people > 3:
- price *= 0.9
- if hours > 4:
- price *= 0.5
- elif day_night == 'day' and month in ['june', 'july', 'august']:
- price = 12.6
- if people > 3:
- price *= 0.9
- if hours > 4:
- price *= 0.5
- elif day_night == 'night' and month in ['march', 'april', 'may']:
- price = 8.4
- if people > 3:
- price *= 0.9
- if hours > 4:
- price *= 0.5
- elif day_night == 'night' and month in ['june', 'july', 'august']:
- price = 10.2
- if people > 3:
- price *= 0.9
- if hours > 4:
- price *= 0.5
- total_cost = price * hours * people
- print(f'Price per person for one hour: {price:.2f}')
- print(f'Total cost of the visit: {total_cost:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment