Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Python Program to Calculate Federal Income Tax
Answered

Task

Your assignment is to create a Python program that calculates the federal income tax owed for individuals filing taxes or married couples filing taxes jointly. Your program should allow the user to specify the name of a CSV file that they would like to have analyzed. Your program should open and read the specified file, and it should calculate and print the federal income tax owed for each entry (row) in that file. The program should ask the user if they would like to analyze another file and allow the user to analyze an unlimited number of files.

Each CSV file that your program will analyze should follow the same basic format as the following (this CSV file is posted alongside the assignment as employees1.csv). The CSV files provided alongside this assignment are intended as examples; your program should be able to handle any CSV of this format. Each CSV file should consist of three columns. The first column contains the name(s) of the filer(s); the second column contains their filing status (“s” for single or “m” for married); and the third column contains their taxable income.

Depending whether an individual is filing taxes or a married couple is filing jointly, the following are the estimated federal income tax brackets for the year 2020 (adapted from this Forbes article). For each bracket, the included formula determines how much money the individual or married couple owes in federal income taxes.

• The United States tax code is extremely complex, and commercial tax preparation software packages such as TurboTax include more considerations, such as deductions, dependents, state income taxes, etc. Please do not rely on your Python assignment for tax advice.

• When your program asks the user for a CSV file to analyze, consider the possibility that the user asks for the analysis of a CSV file that does not exist. Ensure that your program can handle this case and prints out an appropriate message indicating to the user that the file could not be found.

• You may assume that the CSV files that the program will read will be well-formatted. They will always contain the same three columns in the same order, and each income value will always be a well-formatted numeric value greater than zero. However, it is possible that a row will contain an invalid filing status (something other than “s” or “m”; there is an example of this case in employees2.csv). If this case occurs, print out a message indicating that the status code for that row was invalid.

• When your program asks the user if they would like to analyze another file, consider the possibility that the user will respond in uppercase, lowercase, or mixed case letters (“YES”, “yes”, or “Yes”, for example). Ensure that your program can handle any of these possibilities appropriately.

• Ensure that your prompts and output are crisp, professional, and well-formatted. For example, ensure that you have used spaces appropriately and checked your spelling.

• Adding comments in your code is encouraged. You may decide how best to comment your code. At minimum, please use a comment at the start of your code to describe its basic functionality.

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close