Python 小案例 计算个人所得税

#coding=utf-8
monthMoney=input("请输入月收入:")
ds=3500 #扣除标准
threeInsurancesUp=7662#三险一金上线
yangLao=monthMoney*0.08
yiLiao=monthMoney*0.02
shiYe=monthMoney*0.005
homeMoney=monthMoney*0.12
threeInsurances=yangLao+yiLiao+shiYe+homeMoney
if threeInsurances>threeInsurancesUp:
    threeInsurances=threeInsurancesUp
#应纳税所得额
payable=monthMoney-threeInsurances-ds
single=0
if payable<1500:
    single=payable*0.03-0
elif payable>=1500 and payable<4500:
     single=payable*0.1-105
elif payable>=4500 and payable<9000:
     single=payable*0.2-555
elif payable>=9000 and payable<35000:
     single=payable*0.25-1005
elif payable>=35000 and payable<55000:
     single=payable*0.3-2002
elif payable>=55000 and payable<80000:
     single=payable*0.35-5505
elif payable>=80000:
     single=payable*0.45-13505
if single<0:
    single=0
print "应纳个人所得税税额为%.2f" %single


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值