Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python! III 2. Print a payroll statement. Read in the following employee information: Employee's name, number of hours worked this week, hourly pay rate,

Using Python! image text in transcribed
III 2. Print a payroll statement. Read in the following employee information: Employee's name, number of hours worked this week, hourly pay rate, federal tax withholding rate, and state tax withholding rate. Then print a formatted payroll statement. The hours worked, pay rate, and gross pay numbers should align on the right. Federal and state withholding should also align on the right Here is a sample run. Enter employee's name: Angela Beasley Enter number of hours worked this week: 40 Enter hourly pay rate: 11.25 Enter federal tax withholding rate ($): 20 Enter state tax withholding rate (8): 9.5 Weekly Pay Statement for Angela Beasley Hours Worked: 40.0 Pay Rate: $11.25 Gross Pay: $450.00 Deductions: Federal Withholding (20%). $90.00 State Withholding (9.5): $42.75 I Net Pay: $317.25 Here is the output again, with dashes (-) in place of the spaces. This is to help you determine how many spaces are in the output. The dashes should not be printed in your program! This is just to help you match the expected output. Remember that we will test this by putting in different input values than these. Your output should still align correctly. You can assume that the federal withholding rate will always be a 2 digit number You can assume that the state withholding rate will always be in the format XX. Hint: the highlighted portion will always be 9 characters wide, no matter how many hours are worked. Weekly Day Statement for Angela Beasley Hours Worked-40.0 Vay Wate 125 Gross Payi450.00 Deductions: --Federal withholding (208)--$90.00 --State Withholding (9,5)-$42.75 lot Pay $317.25

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_2

Step: 3

blur-text-image_3

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Why are retained earnings not considered an asset of the firm?

Answered: 1 week ago

Question

How should we draw the line between normality and disorder?

Answered: 1 week ago