Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program explores the use of decision structures. The new program should take into account overtime, and output the following regular hours overtime hours regular

This program explores the use of decision structures.

The new program should take into account overtime, and output the following

  • regular hours
  • overtime hours
  • regular pay
  • overtime pay
  • gross or total pay
  • tax withheld at rate of 12.5%
  • other deductions at rate of 5% of the the total pay over $500.00
  • net pay

Write a program that asks for the number of hours for that week and generates a pay stub with the outputs listed above.

  1. Copy Template.py to a new file with a descriptive name.
  2. Update the file header with your info
  3. Update the IPO template, listing inputs, outputs, and any formulas you use.
  4. Create variables as needed. Make sure the names fit Python rules and conventions and are descriptive.
  5. Add comments and blank lines to identify and describe code sections
  6. Make the output readable
  7. Make the inputs able to be entered as any amount of hours and pay type.

Example output/result

image text in transcribed
Pay Program Enter the number of hours worked this week: 60 Pay Stub Regular Overtime Hours 40 20.0 Pay 600.0 450.0 Gross Pay: 1050.0 Tax : 131 .25 Other deductions : 27.5 Net pay: 891. 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

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions