TypeError Traceback (most recent call last)
Cell In[1], line 23
20 tax_threshold = 5000
22 # 计算社保缴费总额
—> 23 total_social_insurance = sum([base_salary * rate for base_salary, rate in social_insurance_rates.items()])
25 # 计算应纳税所得额
26 taxable_income = 5000 - total_social_insurance - tax_threshold
Cell In[1], line 23, in <listcomp>(.0)
20 tax_threshold = 5000
22 # 计算社保缴费总额
—> 23 total_social_insurance = sum([base_salary * rate for base_salary, rate in social_insurance_rates.items()])
25 # 计算应纳税所得额
26 taxable_income = 5000 - total_social_insurance - tax_threshold
TypeError: can’t multiply sequence by non-int of type ‘float’