TypeError Traceback (most recent call last)
Cell In[1], line 16
13 tax_threshold = 5000
15 # 计算社保缴费总额
—> 16 social_security_total = sum([base * rate for base, rate in social_security_rates.items()])
18 # 计算应纳税所得额
19 taxable_income = 16500 - social_security_total - tax_threshold
Cell In[1], line 16, in <listcomp>(.0)
13 tax_threshold = 5000
15 # 计算社保缴费总额
—> 16 social_security_total = sum([base * rate for base, rate in social_security_rates.items()])
18 # 计算应纳税所得额
19 taxable_income = 16500 - social_security_total - tax_threshold
TypeError: can’t multiply sequence by non-int of type ‘float’