TypeError Traceback (most recent call last)
Cell In[1], line 14
5 social_insurance_rates = {
6 “养老保险”: 0.08,
7 “医疗保险”: 0.02,
(…)
10 “生育保险”: 0.005
11 }
13 # 计算每月扣款金额
—> 14 monthly_deduction = sum([base * rate for base, rate in social_insurance_rates.items()])
15 monthly_deduction
Cell In[1], line 14, in <listcomp>(.0)
5 social_insurance_rates = {
6 “养老保险”: 0.08,
7 “医疗保险”: 0.02,
(…)
10 “生育保险”: 0.005
11 }
13 # 计算每月扣款金额
—> 14 monthly_deduction = sum([base * rate for base, rate in social_insurance_rates.items()])
15 monthly_deduction
TypeError: can’t multiply sequence by non-int of type ‘float’