KeyError Traceback (most recent call last)
Cell In[1], line 36
34 # 确定适用税率和速算扣除数
35 tax_rate = next(rate for limit, rate in tax_rates.items() if taxable_income <= limit)
—> 36 tax_deduction = tax_brackets[tax_rate]
38 # 计算个人所得税
39 personal_tax = taxable_income * tax_rate - tax_deduction
KeyError: 0.03