Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_junior_bikers = int(input())
- number_senior_bikers = int(input())
- type_of_race = input()
- junior_price = 0
- senior_price = 0
- if type_of_race == 'trail':
- junior_price = 5.50
- senior_price = 7
- elif type_of_race == 'cross-country':
- junior_price = 8
- senior_price = 9.50
- if number_junior_bikers + number_senior_bikers >= 50:
- junior_price *= 0.75
- senior_price *= 0.75
- elif type_of_race == 'downhill':
- junior_price = 12.25
- senior_price = 13.75
- elif type_of_race == 'road':
- junior_price = 20
- senior_price = 21.50
- total_price = number_junior_bikers * junior_price + number_senior_bikers * senior_price
- after_tax = total_price - total_price * 0.05
- print(f'{after_tax:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment