1 #-*-coding:utf-8-*-2 3total = Int (input ("Total Before taxes:"))4 5 #Provident Fund 10%6Gongjijin = Total * 0.17 Print("Provident Fund Individual payment:%.2f"%Gongjijin)8 #Endowment Insurance 8%, Medicare 2%, unemployment 0.4%, total 10.4%9Shebao = Total * 0.104TenYingnashui = Total-gongjijin-Shebao One A Print("minus five risk one gold left:%.2f"%Yingnashui) - - #Taxable income = Taxable earnings-Personal deduction of social Security-personal withholding fund-tax starting point theYingnashui = float (yingnashui)-3500 - - defShui (x):#Ladder Tax Form - ifX < 1500: + returnX * 0.03 - elifX <=0: + return 'Error' A elif(x>1500 andx<=4500): at return(x*0.10-105) - elifx>4500 andx<=9000: - return(x*0.20-555) - elifx>9000 andx<=35000: - return(x*0.25-1005) - elifx>3500 andx<=55000: in return(x*0.3-2755) - elifx>55000 andx<=80000: to return(x*0.35-5505) + elifx>80000: - return(x*0.45-13505) the *Tax =Shui (Yingnashui) $ Panax Notoginseng - Print("Total Tax amount:%.2f"%Tax ) the +result = Yingnashui-shui (Yingnashui) +3500 A the Print("After- tax surplus:%.2f"%result) + -Input ("Press any key to exit")
Python calculates a payroll tax