TypeError Traceback (most recent call last)
Cell In[1], line 10
3 insurance_rates = {
4 “养老保险”: {“公司”: 0.16, “个人”: 0.08},
5 “医疗保险”: {“公司”: 0.087, “个人”: 0.02},
6 “失业保险”: {“公司”: 0.007, “个人”: 0.003},
7 }
9 # 计算公司和个人每月应缴纳的社保费用
—> 10 company_payment = {name: base_salary * rate for name, rate in insurance_rates.items()}
11 personal_payment = {name: base_salary * rate for name, rate in insurance_rates.items()}
13 # 计算总费用
Cell In[1], line 10, in <dictcomp>(.0)
3 insurance_rates = {
4 “养老保险”: {“公司”: 0.16, “个人”: 0.08},
5 “医疗保险”: {“公司”: 0.087, “个人”: 0.02},
6 “失业保险”: {“公司”: 0.007, “个人”: 0.003},
7 }
9 # 计算公司和个人每月应缴纳的社保费用
—> 10 company_payment = {name: base_salary * rate for name, rate in insurance_rates.items()}
11 personal_payment = {name: base_salary * rate for name, rate in insurance_rates.items()}
13 # 计算总费用
TypeError: unsupported operand type(s) for *: ‘int’ and ‘dict’