New Tax calculator Python script and calculator python script

Source: Internet
Author: User

New Tax calculator Python script and calculator python script
New Tax calculator Python script

New Tax calculator (Python): a beginner script that is extremely simple and does not handle troubleshooting. It is sent only for you to enrich your code.

Click here to download: NewTax.zip

1 #-*-coding: cp936 -*-
2 # This script is using in MIC only, Powered by rexchenhan
3 # proportion of pension insurance companies
4 EI_CoRate = 0.323
5 # individual proportion of pension insurance
6 EI_EmpRate = 0.11
7 # Percentage of provident fund companies
8 HF_CoRate = 0.1
9 # Personal percentage of Provident Fund
10 HF_EmpRate = 0.1
11 # tax start points
12 Threshold = 3500
13
14 Emp_Salary = input ('enter your pre-tax salary :')
15 # Start to calculate
16 EI_Emp = Emp_Salary * EI_EmpRate + 10
17 EI_Co = Emp_Salary * EI_CoRate
18 HF_Emp = Emp_Salary * HF_EmpRate
19 HF_Co = Emp_Salary * HF_CoRate
20 Emp_Sal_Before_Tax = Emp_Salary-(HF_Emp + EI_Emp)
21 Sal_NeedTax = Emp_Sal_Before_Tax-Threshold
22 Tax = 0.0
23 Final_Cash = 0.0
24 # calculate TAX
25 if Sal_NeedTax <= 0:
26 Tax = 0.0
27 elif Sal_NeedTax <1500:
28 Tax = sales_needtax * 0.03
29 elif Sal_NeedTax <4500:
30 Tax = Sal_NeedTax * 0.1
31 elif Sal_NeedTax <9000:
32 Tax = sales_needtax * 0.2
33 elif Sal_NeedTax <35000:
34 Tax = Sal_NeedTax * 0.25
35 elif Sal_NeedTax <55000:
36 Tax = Sal_NeedTax * 0.3
37 elif Sal_NeedTax <80000:
38 Tax = Sal_NeedTax * 0.35
39 else: Tax = sales_needtax * 0.45
40
41 Final_Cash = Emp_Sal_Before_Tax-Tax
42 # Start to print the result
43 Str1 = 'housing provident fund payment: individual undertaking: % 6.1f company undertaking: % 6.1f' % (HF_Emp, HF_Co)
44 Str2 = 'pension insurance payment: individual undertaking: % 6.1f company undertaking: % 6.1f' % (EI_Emp, EI_Co)
45 Str3 = 'tax payable after deduction of various types of insurance: % 6.1f' % Emp_Sal_Before_Tax
46 Str4 = 'tax payable: % 6.1f' % Tax
47 Str5 = 'your final income: % 6.1f' % Final_Cash
48 print '* 60
49 print Str1
50 print Str2
51 print Str3
52 print Str4
53 print Str5 classification: lab records

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.