1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ra1l [238]
3 years ago
5

Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift

, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; any hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third-shift workers can elect to participate in the retirement plan for which 3% of the worker’s gross pay is deducted from the paychecks.
Required:
Write a program that prompts the user for hours worked, shift, and, if the shift is 2 or 3, whether the worker elects the retirement (1 for yes, 2 for no). Display: Hours worked Shift Hourly pay rate Regular pay Overtime pay Total of regular and overtime pay Retirement deduction, if any Net pay.
Computers and Technology
1 answer:
alexira [117]3 years ago
3 0

Answer:

# Initialize the values

overtime_pay = 0

deduction = 0

# Ask the user to enter hours and shift

hours = int(input("Enter hours worked: "))

shift = int(input("Enter shift[1/2/3]: "))

# Check the shift. If it is 1, set the hourly rate as 17

# If the shift is either 2 or 3, ask for participation to retirement plan

# If shift is 2, set the hourly rate as 18.50

# If shift is 3, set the hourly rate as 2

if shift == 1:

   horly_pay_rate = 17

elif shift == 2 or shift == 3:

   retirement = int(input("Participate in the retirement plan? [1 for yes, 2 for no]: "))

   if shift == 2:

       horly_pay_rate = 18.50

       

   if shift == 3:

       horly_pay_rate = 22

# Check the hours. If it is smaller than or equal to 40, calculate only regular pay

# If hours is greater than 40, calculate regular and overtime pay

if hours <= 40:

   regular_pay = (hours * horly_pay_rate)

elif hours > 40:

   regular_pay = (40 * horly_pay_rate)

   overtime_pay = (hours - 40) * (horly_pay_rate * 1.5)        

#calculate total pay

total_pay = regular_pay + overtime_pay

# Check the retirement. If it is 1, calculate and apply deduction

if retirement == 1:

       deduction = total_pay * 0.03

       net_pay = total_pay - deduction

else:

   net_pay = total_pay

   

#print the results

print("Hours worked: " + str(hours))

print("Shift: " + str(shift))

print("Hourly pay rate: " + str(horly_pay_rate))

print("Regular pay: " + str(regular_pay))

print("Overtime pay: " + str(overtime_pay))

print("Total of regular and overtime pay: " + str(total_pay))

print("Retirement deduction: " + str(deduction))

print("Net pay: " + str(net_pay))

Explanation:

*See the comments in the code

You might be interested in
What is the interface of an app?
Darina [25.2K]

Explanation:

An application interface or user interface ,is the set of features an application provides so that user may supply input to and recieve output from,the program.

3 0
2 years ago
What is the name of the option in most presentation applications with which you can modify slide elements?
olga55 [171]

Answer:

Answer to both the question is View Master.

Explanation:

Slide Master View is an element in PowerPoint that enables one to bring modification in slides and slide layouts in the presentation applications. From this option, one is able to edit the slide master. By modifying the slide master, every slide in the presentation is affected. Using this feature, one can also modify single slide layouts.

To select Slide Master command, go to View then select the Slide Master Command, and the Slide Master view will appear on the screen.

Therefore, View Master is the correct answer.

3 0
3 years ago
Read 2 more answers
What should you do when you are working on an unclassified system and receive an email.
koban [17]

Answer:

Don't respond to it. Either leave it there, or just delete it. It is most likely spam or a scammer trying to get your information. Don't respond, please.

3 0
2 years ago
Network a0 is a process by which several protocols evolve to form a single product.
mafiozo [28]

Answer:

Convergent network

Explanation:

In networking, computers devices are connected together to communicate and share resources. Devices like routers and switches are examples of intermediate network devices and computers, smartphones, tablets and IP phones are all examples of end devices in a network.

In the past, dedicated networks are installed for separate voice, text and video packets. But as information technology evolves, one network is used for all three packets. This network is called convergent network.

6 0
2 years ago
What was the strategy the company adopted for ERP implementation?
SashulF [63]

Answer:

Big Bang or Phased Approach – ERP Implementation strategies include Big Bang, Phased, Hybrid, and Parallel Adoption. Each organization requirements are different and as such, the project management method is itself evolving using PPM, SCRUM, and DevOps.

8 0
2 years ago
Other questions:
  • For wired network cards that get their IP addresses through DHCP, what can be set manually?
    5·1 answer
  • When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
    14·1 answer
  • IF ACCURATE = BRAINLY (if u answer rubbish randomness= reported AND if you got questions dont ask in answer slot= reported)
    13·1 answer
  • Which of the following is NOT a fixed expense?
    6·1 answer
  • A _________ is automatically launched by some trigger and appears in front of the active window
    12·1 answer
  • What functions do these WLAN applications and tools perform on WLANs: airmonng, airodump-ng, aircrack-ng, and aireplay-ng
    10·1 answer
  • I need to calculate the % of Grand Total on Microsoft Excel, but can't for the life of me remember how to do that. Help would be
    8·1 answer
  • What constructs break or bend the normal Syntax patterns of scheme?
    15·1 answer
  • Write a code that takes numbers from the user as a list. (User can enter as many numbers as he wants). Then, find mean and stand
    15·1 answer
  • given 2,4,3,-1 as input, what is the output for the following program:total_product = 1 user_value = int(input()) while user_val
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!