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