TypeError Traceback (most recent call last)
Cell In[1], line 26
15 tax_brackets = [
16 (0, 36000, 0.03, 0), # 0-36000元,税率3%,速算扣除数0
17 (36000, 144000, 0.1, 2520), # 36000-144000元,税率10%,速算扣除数2520
(…)
22 (960000, float(‘inf’), 0.45, 181920) # 960000元以上,税率45%,速算扣除数181920
23 ]
25 # 计算社保和公积金个人缴费总额
—> 26 social_insurance_total = sum([base * rate for base, rate in social_insurance_rates.items()])
27 housing_fund_total = base * housing_fund_rate
29 # 计算应纳税所得额
Cell In[1], line 26, in <listcomp>(.0)
15 tax_brackets = [
16 (0, 36000, 0.03, 0), # 0-36000元,税率3%,速算扣除数0
17 (36000, 144000, 0.1, 2520), # 36000-144000元,税率10%,速算扣除数2520
(…)
22 (960000, float(‘inf’), 0.45, 181920) # 960000元以上,税率45%,速算扣除数181920
23 ]
25 # 计算社保和公积金个人缴费总额
—> 26 social_insurance_total = sum([base * rate for base, rate in social_insurance_rates.items()])
27 housing_fund_total = base * housing_fund_rate
29 # 计算应纳税所得额
TypeError: can’t multiply sequence by non-int of type ‘float’