TypeError Traceback (most recent call last)
Cell In[1], line 20
17 tax = taxable_income * 0.03 if taxable_income <= 3000 else taxable_income * 0.1 - 210 # 简化个税计算
19 # 计算社保总扣款
—> 20 social_security_deduction = sum([base * rate for base, rate in social_security_rates.items()])
21 total_deduction = social_security_deduction + tax
23 total_deduction
Cell In[1], line 20, in <listcomp>(.0)
17 tax = taxable_income * 0.03 if taxable_income <= 3000 else taxable_income * 0.1 - 210 # 简化个税计算
19 # 计算社保总扣款
—> 20 social_security_deduction = sum([base * rate for base, rate in social_security_rates.items()])
21 total_deduction = social_security_deduction + tax
23 total_deduction
TypeError: can’t multiply sequence by non-int of type ‘float’