TypeError Traceback (most recent call last)
Cell In[1], line 11
3 social_insurance_rates = {
4 “养老保险”: 0.08, # 个人8%
5 “医疗保险”: 0.02, # 个人2%
6 “失业保险”: 0.003, # 个人0.3%
7 “住房公积金”: 0.08 # 个人8%
8 }
10 # 计算社保缴费总额
—> 11 social_insurance_total = sum([base * rate for base, rate in social_insurance_rates.items()])
13 # 假设工资收入为6700元,扣除社保后的应纳税所得额
14 monthly_income = 6700
Cell In[1], line 11, in <listcomp>(.0)
3 social_insurance_rates = {
4 “养老保险”: 0.08, # 个人8%
5 “医疗保险”: 0.02, # 个人2%
6 “失业保险”: 0.003, # 个人0.3%
7 “住房公积金”: 0.08 # 个人8%
8 }
10 # 计算社保缴费总额
—> 11 social_insurance_total = sum([base * rate for base, rate in social_insurance_rates.items()])
13 # 假设工资收入为6700元,扣除社保后的应纳税所得额
14 monthly_income = 6700
TypeError: can’t multiply sequence by non-int of type ‘float’