23. Tax department collects income tax. The provisions are as follows:
(1) The income is below 2000. Exempt from.
(2) income in 2000-4000, more than 2000 parts of the levy of 3% tax.
(3) income in 4000-6000, more than 4,000 parts of the levy of 4% tax.
(4) income in 6000-10000, more than 6,000 parts of the levy of 8% tax.
(5) More than 10000 of the income, more than the partial levy of 20% tax.
Note: If a person's income is 8000, then he will pay 2000 to 4000 tax plus 4000 to 6000 tax plus 6000 to 8000 tax.
Revenue = 8000-(4000-2000) *3%-(6000-4000) *4%-(8000-6000) *8%
Let the user enter its salary and calculate how much the end-user gets the hand.
L1 = [10000,6000,4000,2000= [0.2,0.08,0.04,0.03=int (input (' Please enter your income: ' ). Strip ()) for in L1: if salary > i: # Print (L1.index (i)) Shuiwu + = (salary-i) *l2[l1.index (i) ]= I Print(SALARY-SHUIWU)
Salay = [10000,6000,4000,2000, 0]tax= [0.2,0.08,0.05,0.03]t= {10000:0.2,6000:0.08,4000:0.05,2000:0.03}content= Int (Input ('Please enter your salary.')) C=Contentsum_tax=0 forIinchT.items ():ifContent >i[0]: Sum_tax+ = (content-i[0]) *i[1] Content=I[0]Print('Pre-tax salary: {}'. Format (c))Print('Personal income tax: {}'. Format (sum_tax))Print('Get paid: {}'. Format (C-sum_tax))
Python3.6 full Stack Development example [023]