Question: Understanding Sequential Statements in Pyto Sequential Statements Summary Payroll.py 1 salary 1258.00 In this lab, you complete the Python program that calculates the amount of

 Understanding Sequential Statements in Pyto Sequential Statements Summary Payroll.py 1 salary
1258.00 In this lab, you complete the Python program that calculates the
amount of tax withheld from an employee's weekly salary, the tax deduction

Understanding Sequential Statements in Pyto Sequential Statements Summary Payroll.py 1 salary 1258.00 In this lab, you complete the Python program that calculates the amount of tax withheld from an employee's weekly salary, the tax deduction to which the employee is entitled for each dependent. and the employee's take-home pay. The program output indudes state tax withheld, federal tax withheld, dependent tax deductions, salary, and take-home pay. Lidl 4 s Calculate stateTax here. cp 6 print( State Tax: $" str(stateTax)) # Calculate federa!Tax here te print( Federal Tax:+str(federalTax)) 12 # Calculate dependantDeductton here 13 14 print(" Dependents: $" +str(dependentDeductton)) 15 16# calculate totalWtthholding here 17 Instructions 1 Some variables have been assigned for you and the output statements have been written. Read the starting code carefully before you proceed to the next step 1 18 # Calculate takeHonepay here 19 2 Write the Python code needed to perform the 20 print Salary+str(salary)) eiieiate state withholding tax (statetax) 2 print("Take Hone Pay Sstr(taketionepay) at 6.5 percent o Calculate federal withholding tax( ederalTax )at 28.0 percent Calculate dependent deductions ( Deduction ) at 2.5 percent of the Type here to search Understanding Sequential Statenents in Pylo Payroll.py Sequential Statements 1 salary 1258.88 folotaleilate state withholding tax ( stateTax)2 nunDependents 2 at 6.5 percent 4 # Calculate stateTax here. 6 print("State Tax: $" + str(stateTax)) E/ # Calculate federalTax here. 10 print( Federal Tax: "+str(federalTax)) 12 Calculate dependantDeduction here o Calculate federal withholding tax federalTax ) at 28.0 percent. o Calculate dependent deductions dependentDeductton )at 2.5 percent of the employee's salary for each dependent calculate total withholding ( totalwithholding ) as stateTax + federalTax +dependentDeductton Calculate take-home pay ( taketonePay ) as salary totalwLthholding i4 print("Dependents: + str(dependentDeductton)) 15 3. Execute the progam by dicking the Run burton 16 t calculate totalwtthholding here. 13 # Calculate takeHonepay here. o print( Salary: $" + str(salary)) at the bottom. You should get the following output State Tax: 581.25 Federal Tax: $356.00000060000086 Dependents: $62,5 alary: $1250 Take-Hone Pay: 5756.25 1 print Take Hone Pay: s+str(takeHonePay)) O Type here to search tanding Sequential Statements in Python Payroll.py Sequential Statements 1 salary1258.80 federalTax + dependentDeduction 2 nunDependents 2 4# Calculate stateTax here. 6 print( State Tax: " str(stateTax)) 8# Calculate federa!Tax here. o Calculate take-home pay ( taketonePay ) as salary totalhithholding 3 Execute the program by clicking the Run button at the bottom. You should get the following output: : 10 print( Federal Tax: +str(federalTax)) State Tax:$81.25 Federal Tax: $350.88900088080006 Dependents: $62.5 salary: $1258.8 Take-Hone Pay: $756.25 12: # Calculate dependantDeduction here 13 14 print( Dependents: str(dependentDeductton)) 15 : 16# Calculate totalwthholding here. 17 18 # Calculate takeHonePay here 4 In this program, the variables named salary and nurDependents are initialized with the values 1250.0 and 2. To make this program more flexible. modify it to accept interactive input for salary and nurDependents 2e printc Salary: s +str(salary)) 21 print( Take Hone Pay: str(takeHonepay) Grading O Type here to search

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!