Guest User

Untitled

a guest
Jul 16th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. def taxcalc(TI):
  2. if TI >= 0 and TI <= 6000:
  3. TT = 0
  4. if TI >= 6001 and TI <= 37000:
  5. TT = (TI - 6000) * 0.15
  6. if TI >= 37001 and TI <= 80000:
  7. TT = ((TI - 37000) * 0.30) + 4650
  8. if TI >= 80001 and TI <= 180000:
  9. TT = ((TI - 80000) * 0.37) + 17550
  10. if TI >= 180000:
  11. TT = ((TI - 180000) * 0.45) + 54550
  12.  
  13. def nicalc(TI, TT):
  14. NI = TI - TT
  15. #Convey the total tax, net income, and gross income
  16. taxconvey(TT, NI, TI)
  17.  
  18. def taxconvey(TT, NI, TI):
  19. print ('The total tax is: %.2f' % TT)
  20. print ('The net income is: %.2f' % NI)
  21. print ('The gross income is: %.2f' % TI)
  22.  
  23. def main():
  24. print ('Program Starting...')
  25. #Gather taxable income from the user
  26. TI = float (input ('Enter taxable income: '))
  27. #Calculte the total tax and net income
  28. taxcalc(TI)
  29. nicalc(TI, TT)
  30. print ('Program Finished')
  31.  
  32. main()
Add Comment
Please, Sign In to add comment