TypeError Traceback (most recent call last)
Cell In[1], line 12
3 social_insurance_rates = {
4 “养老保险”: 0.08, # 个人缴费比例
5 “医疗保险”: 0.02, # 个人缴费比例
(…)
8 “生育保险”: 0 # 个人不缴费
9 }
11 # 计算个人缴费金额
—> 12 personal_payment = sum([base_salary * rate for rate, rate_value in social_insurance_rates.items() if rate_value > 0])
14 personal_payment
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’