TypeError Traceback (most recent call last)
Cell In[1], line 17
14 tax_amount = tax_base * tax_rate - quick_deduction
16 # 社保缴费计算
—> 17 social_security_amount = sum([base * rate for base, rate in social_security_rates.items()])
19 # 总扣款
20 total_deduction = tax_amount + social_security_amount
Cell In[1], line 17, in <listcomp>(.0)
14 tax_amount = tax_base * tax_rate - quick_deduction
16 # 社保缴费计算
—> 17 social_security_amount = sum([base * rate for base, rate in social_security_rates.items()])
19 # 总扣款
20 total_deduction = tax_amount + social_security_amount
TypeError: can’t multiply sequence by non-int of type ‘float’