Advertisement
anton_d

04.transport_price

Jan 18th, 2022 (edited)
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. trip = int(input())
  2. time = input().lower()
  3.  
  4. if trip < 20:
  5.     if time == 'day':
  6.         print('{taxi:.2f}'.format(taxi=0.7 + (trip * 0.79)))
  7.     elif time == 'night':
  8.         print('{taxi:.2f}'.format(taxi=0.7 + (trip * 0.90)))
  9.  
  10. if 20 <= trip < 100:
  11.     print('{bus:.2f}'.format(bus=trip * 0.09))
  12. elif 100 <= trip:
  13.     print('{train:.2f}'.format(train=trip * 0.06))
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement