TypeError Traceback (most recent call last)
Cell In[1], line 12
3 social_security_rates = {
4 “养老保险”: 0.08, # 个人承担比例
5 “医疗保险”: 0.02, # 个人承担比例
(…)
8 “生育保险”: 0 # 个人不承担
9 }
11 # 计算个人社保缴费总额
—> 12 social_security_payment = sum([base * rate for base, rate in social_security_rates.items()])
14 # 假设公积金个人缴费比例为5%
15 housing_fund_rate = 0.05
Cell In[1], line 12, in <listcomp>(.0)
3 social_security_rates = {
4 “养老保险”: 0.08, # 个人承担比例
5 “医疗保险”: 0.02, # 个人承担比例
(…)
8 “生育保险”: 0 # 个人不承担
9 }
11 # 计算个人社保缴费总额
—> 12 social_security_payment = sum([base * rate for base, rate in social_security_rates.items()])
14 # 假设公积金个人缴费比例为5%
15 housing_fund_rate = 0.05
TypeError: can’t multiply sequence by non-int of type ‘float’