Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please note: *formatting is very important* Working with Variables, Functions, & Strings Financial application: Payroll & Access Code creation VCU Widgets is new startup company

Please note: *formatting is very important*

Working with Variables, Functions, & Strings

Financial application: Payroll & Access Code creation

VCU Widgets is new startup company in Richmond and has learned that you are taking a programming class. They are very interested in creating a payroll and Access Code program and they have come to you for help. You will create a Python program (named: LastnameFirstInitial_PA2) to calculate the total net paycheck and Access Code using the following information.

Data to be input:

Employee Name (first & last)

Number of hours worked

Hourly pay rate

Married or Single (to determine Federal tax rate)*

State tax rate

*Married tax rate 8%, Single tax rate 12% (use decision statement to test first letter only, make sure to change the capitalization to what you are testing). You may also want to use the Round function.

Output:

Use hourly wage and hours worked to determine Gross Pay. Then use appropriate withholding percentages to determine deductions.

Determine Access Code:

Create and combine the following 3 strings to determine Access Code. You will use string functions, methods, and operators for this.

String 1.Use remainder division to divide the length of the name string by 3. Use the portion of the name that starts at that position number, and includes up to the character in position 5 (see 2 examples below)

String 2.Use the last 4 letters, in upper case

String 3.Use the min and max letters/characters

image text in transcribed

Sample input and output: Enter employee's name (first and last): Dolly Madison Enter number of hours worked this week: 34 Enter hourly pay rate: 12.85 Please enter single or Married: s Enter state tax withholding rate: .05 Employee Name: Dolly Madison Hours Worked: 34 Pay Rate: $12.85 Gross Pay: $436.90 Deductions: Federal withholding (12%): $52.43 State withholding (58): $21.84 Total Deduction:$74.27 Dolly Madison net pay check: $362.63 Your new access code is: olly ISON y Enter employee's name (first and last) Samuel Duke Enter number of hours worked this week: 11 Enter hourly pay rate: 27.5 Please enter Single or Married: Married Enter state tax withholding rate: .5 Employee Name: Samuel Duke Hours Worked: 11 Pay Rate: $27.50 Gross Pay: $302.50 Deductions: Federal withholding (88): $24.20 state withholding (50%): $151.25 Total Deduction: $175.45 Samuel Duke net pay check: $127.05 Your new access code is: muelDUKE u

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions