TypeError Traceback (most recent call last)
Cell In[1], line 12
3 social_insurance_rates = {
4 ‘养老保险’: 0.08, # 个人缴费比例
5 ‘失业保险’: 0.003, # 个人缴费比例
(…)
8 ‘生育保险’: 0, # 个人不缴费
9 }
11 # 计算社保缴费总额
—> 12 total_social_insurance = sum([base * rate for base, rate in social_insurance_rates.items()])
14 # 扣税计算
15 # 假设工资薪金所得为11600元,扣除社保后的应纳税所得额
16 taxable_income = 11600 - total_social_insurance
Cell In[1], line 12, in <listcomp>(.0)
3 social_insurance_rates = {
4 ‘养老保险’: 0.08, # 个人缴费比例
5 ‘失业保险’: 0.003, # 个人缴费比例
(…)
8 ‘生育保险’: 0, # 个人不缴费
9 }
11 # 计算社保缴费总额
—> 12 total_social_insurance = sum([base * rate for base, rate in social_insurance_rates.items()])
14 # 扣税计算
15 # 假设工资薪金所得为11600元,扣除社保后的应纳税所得额
16 taxable_income = 11600 - total_social_insurance
TypeError: can’t multiply sequence by non-int of type ‘float’