Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kilometers = int(input())
- time_of_day = str(input())
- taxi_price_day = 0.70 + kilometers * 0.79
- taxi_price_night = 0.70 + kilometers * 0.9
- bus_price = kilometers * 0.09
- train_price = kilometers * 0.06
- if time_of_day == "day" and kilometers < 20:
- print(f'{taxi_price_day:.2f}')
- elif time_of_day == "night" and kilometers < 20:
- print(f'{taxi_price_night:.2f}')
- elif 20 <= kilometers < 100:
- print(f'{bus_price:.2f}')
- else:
- print(f'{train_price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment