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 total_deduction = sum([base_salary * rate for rate, name in social_security_rates.items() if name != ‘工伤保险’ and name != ‘生育保险’])
14 total_deduction
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’