NameError Traceback (most recent call last)
Cell In[1], line 23
12 tax_brackets = {
13 0: (0, 0.03, 0),
14 36000: (0.03, 0.1, 2520),
(…)
19 960000: (0.35, 0.45, 181920)
20 }
22 # 计算社保缴费
—> 23 social_security_payment = sum(base_salary * rate for rate in social_security_rates.values())
25 # 计算应纳税所得额
26 taxable_income = base_salary - tax_threshold - social_security_payment
Cell In[1], line 23, in <genexpr>(.0)
12 tax_brackets = {
13 0: (0, 0.03, 0),
14 36000: (0.03, 0.1, 2520),
(…)
19 960000: (0.35, 0.45, 181920)
20 }
22 # 计算社保缴费
—> 23 social_security_payment = sum(base_salary * rate for rate in social_security_rates.values())
25 # 计算应纳税所得额
26 taxable_income = base_salary - tax_threshold - social_security_payment
NameError: name ‘base_salary’ is not defined