Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def taxcalc(TI):
- if TI >= 0 and TI <= 6000:
- TT = 0
- if TI >= 6001 and TI <= 37000:
- TT = (TI - 6000) * 0.15
- if TI >= 37001 and TI <= 80000:
- TT = ((TI - 37000) * 0.30) + 4650
- if TI >= 80001 and TI <= 180000:
- TT = ((TI - 80000) * 0.37) + 17550
- if TI >= 180000:
- TT = ((TI - 180000) * 0.45) + 54550
- def nicalc(TI, TT):
- NI = TI - TT
- #Convey the total tax, net income, and gross income
- taxconvey(TT, NI, TI)
- def taxconvey(TT, NI, TI):
- print ('The total tax is: %.2f' % TT)
- print ('The net income is: %.2f' % NI)
- print ('The gross income is: %.2f' % TI)
- def main():
- print ('Program Starting...')
- #Gather taxable income from the user
- TI = float (input ('Enter taxable income: '))
- #Calculte the total tax and net income
- taxcalc(TI)
- nicalc(TI, TT)
- print ('Program Finished')
- main()
Add Comment
Please, Sign In to add comment