Python题目:个人所得税计算

Python题目:个人所得税计算

rate = [0.03, 0.1, 0.2, 0.25, 0.3, 0.35, 0.45]
quict_cal = [0, 210, 1410, 2660, 4410, 7160, 15160]
salary = float(input("请输入您的月工资:"))

if salary <= 5000:
    print("恭喜您,您的工资在免征税范围内!")
elif salary > 5000 and salary <= 8000:
    print("使用税率:",rate[0])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[0] - quict_cal[0]))
elif salary > 8000 and salary <= 17000:
    print("使用税率:", rate[1])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[1] - quict_cal[1]))
elif salary > 17000 and salary <= 30000:
    print("使用税率:", rate[2])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[2] - quict_cal[2]))
elif salary > 30000 and salary <= 40000:
    print("使用税率:", rate[3])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[3] - quict_cal[3]))
elif salary > 40000 and salary <= 60000:
    print("使用税率:", rate[4])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[4] - quict_cal[4]))
elif salary > 60000 and salary <= 85000:
    print("使用税率:", rate[5])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[5] - quict_cal[5]))
elif salary > 85000:
    print("使用税率:", rate[6])
    print("您应该缴纳的个人所得税为:%.3f元" % (salary * rate[6] - quict_cal[6]))

 

你可能感兴趣的:(Python)