NameError Traceback (most recent call last)
Cell In[1], line 19
9 base_salary = 18200
11 # 计算单位与个人缴费总额
12 total_cost = {
13 “养老保险”: {
14 “单位”: base_salary * proportion[“养老保险”][“单位”],
15 “个人”: base_salary * proportion[“养老保险”][“个人”]
16 },
17 “医疗保险”: {
18 “单位”: base_salary * proportion[“医疗保险”][“单位”],
—> 19 “个人”: basesalary * proportion[“医疗保险”][“个人”]
20 },
21 “失业保险”: {
22 “单位”: base_salary * proportion[“失业保险”][“单位”],
23 “个人”: base_salary * proportion[“失业保险”][“个人”]
24 }
25 }
27 # 计算总费用
28 total_payment = sum([
29 total_cost[“养老保险”][“单位”] + total_cost[“养老保险”][“个人”],
30 total_cost[“医疗保险”][“单位”] + total_cost[“医疗保险”][“个人”],
31 total_cost[“失业保险”][“单位”] + total_cost[“失业保险”][“个人”]
32 ])
NameError: name ‘basesalary’ is not defined