Personal income tax calculation script

= 30000 the salary   # wage 
kouchu = 6000 + 2000    # five insurance deducted additional gold (education, health, old age, etc.) 

I =. 1 
ARR = [] 
BRR = []
 the while I <12 is : 
    E = (the salary - kouchu - 5000 ) * I
     IF E <= 36000 : 
        K = 0.03 * E - SUM (ARR) 
        arr.append (K) 
    elif 36000 <E <= 144000 : 
        K = 0.1 * E -sum (ARR) - 2520 
        arr.append (K ) 
    elif 144000 <E <= 300000 : 
        K = 0.2 * E - SUM (ARR) - 16920
        arr.append(k)
    elif 300000 < e <= 420000:
        k = e * 0.25 - sum(arr) - 31920
        arr.append(k)
    elif 420000 < e <= 660000:
        k = e * 0.3 - sum(arr) - 52920
        arr.append(k)
    elif 660000 < e <= 960000:
        k = e * 0.35 - sum(arr) - 52920
        arr.append(k)
    elif 960000 < e:
        k = e * 0.45 - sum(arr) - 52920
        arr.append(k)
    s = salary - kouchu - arr[i-1]
    brr.append(s)
    # print('%.1f' %arr[i-1],'%.1f' %s)
    =. 1 + I Print ([round (I, 2) for I in ARR])
 Print ([round (I, 2) for I in BRR]) output:



[510.0, 510.0, 1560.0, 1700.0, 1700.0, 1700.0, 1700.0, 1700.0, 2600.0, 3400.0, 3400.0]
[21490.0, 21490.0, 20440.0, 20300.0, 20300.0, 20300.0, 20300.0, 20300.0, 19400.0, 18600.0, 18600.0]

 

Guess you like

Origin www.cnblogs.com/tortoise512/p/10986153.html