NameError Traceback (most recent call last)
Cell In[1], line 21
1 # 社保基数和扣税计算
2 # 假设社保基数是14600元,按照山西省社保费率计算
3 # 社保费率(假设值,需根据最新政策确认):
(…)
10
11 # 计算社保缴费总额
12 social_security_rates = {
13 ‘养老保险’: 0.08,
14 ‘医疗保险’: 0.02,
(…)
18 ‘公积金’: 0.05
19 }
—> 21 total_social_security = sum(basic_salary * rate for rate in social_security_rates.values())
23 # 计算个税(假设工资为14600元,扣除社保后)
24 monthly_income = 14600
Cell In[1], line 21, in <genexpr>(.0)
1 # 社保基数和扣税计算
2 # 假设社保基数是14600元,按照山西省社保费率计算
3 # 社保费率(假设值,需根据最新政策确认):
(…)
10
11 # 计算社保缴费总额
12 social_security_rates = {
13 ‘养老保险’: 0.08,
14 ‘医疗保险’: 0.02,
(…)
18 ‘公积金’: 0.05
19 }
—> 21 total_social_security = sum(basic_salary * rate for rate in social_security_rates.values())
23 # 计算个税(假设工资为14600元,扣除社保后)
24 monthly_income = 14600
NameError: name ‘basic_salary’ is not defined