The project develops a Python program for U.S. income tax calculation step-by-step, including input handling, AGI computation, deductions, taxable income, federal tax estimation, and assessing tax due with rigorous testing for accuracy and functionality.
This project aims to create a Python program for U.S. income tax calculation, progressing step-by-step:
Inputting wage, interest, unemployment, status, and taxes withheld.
Calculating Adjusted Gross Income (AGI) by summing wages, interest, and unemployment, handling potential negative values.
Determining deductions based on status: dependent, single, or married, returning appropriate values.
Computing taxable income (AGI - deduction), ensuring non-negative results.
Calculating federal tax based on income brackets and status, rounding to the nearest whole number.
Evaluating tax due by accounting for withheld taxes and correcting potential input errors (e.g., negative withheld amounts).
Each function contributes to specific computations, systematically building the tax calculation system. After completing each step, tests validate the functionality before advancing to the next stage, ensuring accurate and efficient tax calculations through multiple validation checks.