NameError Traceback (most recent call last)
Cell In[1], line 30
20 company_rates = {
21 “养老保险”: 0.16,
22 “医疗保险”: 0.085,
(…)
26 “公积金”: 0.1, # 取10%的中间值
27 }
29 # 计算个人和企业每月缴纳金额
—> 30 monthly_payment = {insurance: base * rate for insurance, rate in personal_rates.items()}
31 monthly_company_payment = {insurance: base * rate for insurance, rate in company_rates.items()}
33 # 计算年度总缴纳金额
Cell In[1], line 30, in <dictcomp>(.0)
20 company_rates = {
21 “养老保险”: 0.16,
22 “医疗保险”: 0.085,
(…)
26 “公积金”: 0.1, # 取10%的中间值
27 }
29 # 计算个人和企业每月缴纳金额
—> 30 monthly_payment = {insurance: base * rate for insurance, rate in personal_rates.items()}
31 monthly_company_payment = {insurance: base * rate for insurance, rate in company_rates.items()}
33 # 计算年度总缴纳金额
NameError: name ‘base’ is not defined