Python calculates a payroll tax

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.