Advertisement
Guest User

Untitled

a guest
Nov 11th, 2020
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. junior = int(input())
  2. senior = int(input())
  3. trace = input()
  4.  
  5. tax=0
  6.  
  7. if trace == 'trail':
  8. tax = junior * 5.50 + senior * 7
  9. elif trace =='cross-country':
  10. if (junior + senior) >= 50:
  11. tax = (junior * 8 + senior * 9.50) * 0.75
  12. else:
  13. tax = junior * 8 + senior * 9.50
  14. elif trace =='downhill':
  15. tax = junior *12.25 + senior * 13.75
  16. elif trace =='road':
  17. tax = junior * 20 + senior*21.50
  18. tax = tax*0.95
  19. tax = round(tax,2)
  20. print(f'{tax:.2f}')
  21.  
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement