NameError Traceback (most recent call last)
Cell In[1], line 16
6 proportion = {
7 “养老保险”: 0.08,
8 “医疗保险”: 0.02,
(…)
12 “公积金”: 0.08
13 }
15 # 计算各项社保费用
—> 16 social_security_cost = {insurance: base_salary * rate for insurance, rate in proportion.items()}
18 # 总扣税金额
19 total_deduction = sum(social_security_cost.values())
Cell In[1], line 16, in <dictcomp>(.0)
6 proportion = {
7 “养老保险”: 0.08,
8 “医疗保险”: 0.02,
(…)
12 “公积金”: 0.08
13 }
15 # 计算各项社保费用
—> 16 social_security_cost = {insurance: base_salary * rate for insurance, rate in proportion.items()}
18 # 总扣税金额
19 total_deduction = sum(social_security_cost.values())
NameError: name ‘base_salary’ is not defined