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