Question: How do I complete this Income Tax Python code? Your program collect tax form inputs from the user as follows: General information: full name and

How do I complete this Income Tax Python code?

Your program collect tax form inputs from the user as follows: General information: full name and tax period (specified as a year) as a single input, with the fullname and year separated by a comma. E.g. John Smith, 2022 Income information: wages, interest, unemployment compensation, status and withheld tax as a single input separated by spaces 3.

Explanation of the income information is given below (all values are integer amounts): Wages: your annual salary. Eg. 50000 Taxable interest: on balance owing or late filing, or 0 if not applicable Unemployment compensation: enter 0 if not applicable Status: 0=dependent, 1=single, 2=married Taxes withheld: amount withheld, or 0 if not applicable

For process_form_input() which takes two arguments, general_info and income_info, both of which are of type str, and returns a dictionary containing the tax filing information, here is an example processed form: { 'name': 'John Smith', 'year': 2022, 'wages': 65000, 'interest': 50, 'unemployment': 400, 'status': 1, 'withheld': 500 }

Write a function, get_status(), which takes an integer value and returns either Dependent, Single or Married depending on the value of the argument

Write a function, calc_AGI() which calculates the Adjusted Gross Income. The function takes dictionary containing the tax form information as argument and return the Adjusted Gross Income, which obtained by adding together the wages, interest and unemployment compensation

Write a function get_deduction() which takes as argument a dictionary containing the tax form information and returns the deduction based on status. The deduction is as follows: Dependent: 6,000 Single: 12,000 Married: 24,000

Write a function calc_taxable() which takes a dictionary containing the tax form information and returns the taxable income. The taxable income is obtained by the deduction from the Adjusted Gross Income.

In your main() function, get input from the user as follows: General information: full name and tax period (specified as a year) as a single input, with the fullname and year separated by a comma. E.g. John Smith, 2022 Income information: wages, interest, unemployment compensation, status and withheld tax as a single input separated by spaces

In your main() function, process the inputs using the process_form_input() function and print the information on the screen. An example output is shown here: Name: John Smith Tax year: 2022 Wages: 65000 Interest: 50 Unemployment: 500 Status: Single Withheld tax: 300 Adjusted Gross Income: 65550 Deduction: 12000 Taxable income: 53550

Code starts from here:

def process_form_input(general_info, income_info):

pass

def get_status(status):

pass

def calc_AGI(tax_form):

pass

def get_deduction(form):

pass

def calc_taxable(form):

pass

def calc_tax_due(form):

pass

def main():

pass

if __name__ == '__main__':

main()

Code Ends here

Can someone help me with this?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!