Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been tasked with writing a Python program that will compute the mandatory federal taxes/deductions that must be withheld for a single person who

image text in transcribed
You have been tasked with writing a Python program that will compute the mandatory federal taxes/deductions that must be withheld for a single person who gets paid bi-weekly (i.e., 26 times per year). Calculations are based on the following table: Federal Tax Withholding Table (Single Persons) If the bi-weekly gross pay is the amount of income tax to withhold is: $0 - $145 $0 $146 - $518 $0 + 10% of the excess over $146 $519 - $1,663 $37.30 + 12% of the excess over $519 $1,664 - $3,384 $174.70 +22% of the excess over $1,664 $3,385 - $6,327 $553.32 +24% of the excess over $3,385 $6,328 - $7,995 $1,259.64 + 32% of the excess over $6,328 $7,996 - $19,772 $1,793.40 + 35% of the excess over $7,996 Over $19,773 $5,915.35 + 37% of the excess over $19,773 In addition to income tax withheld, employees must pay 7.65% of their bi-weekly gross pay for FICA taxes, which include Social Security and Medicare. Write a Python program that contains at least three (3) functions - main, getData, and compute - that complete the following tasks: a function named main that "kicks off the program with a description of what the program will do. It will then call the getData function (see below). a function named getData reads the file named employees.txt, one record at a time. Each record contains a name and annual salary. (Keep in mind that this file may contain any number of records.) This function will then call (with one argument) the compute function (see below) to calculate the total federal taxes/deductions. Once the employee's total deductions have been passed back from the compute function, your program should display (to the screen) the employee's name, bi-weekly gross pay, total federal taxes/deductions, and bi-weekly net pay, a function compute that has the bi-weekly gross pay passed to it as the argument. It will then compute and return to the getData function the employee's total federal taxes/deductions. Notes: Gross pay is the amount of money employees receive before any taxes and deductions are taken out... Net pay is the amount of money employees take home after all deductions have been taken out. To receive partial credit for this question, you must include an algorithm or IPO chart. All values displayed must include two (2) decimal places and commas, as appropriate

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

1. Which is the most abundant gas presented in the atmosphere?

Answered: 1 week ago

Question

In 2010, there were nearly

Answered: 1 week ago