Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Megan owns a small neighborhood coffee shop, and she has fifteen employees who work as baristas. All of the employees have the same hourly pay

Megan owns a small neighborhood coffee shop, and she has fifteen employees who work as baristas. All of the employees have the same hourly pay rate. Megan has asked you to design a program that will allow her to enter the number of hours worked by each employee and then display the amounts of all the employees' gross pay. You determine that the program should perform the following steps:

  1. For each employee:
  2. get the employee name from the file named employee_names.txt (attached in Blackboard)
  3. get the number of hours worked from the employee
  4. write an try/except statement to gracefully respond to a ValueError exception for hours
  5. store in employee_names file - beside the corresponding employee name
  6. read data from file and store hours worked in a list element.
  7. For each list element: use the value stored in the element to calculate an employee's gross pay.
  8. Display the amount of the gross pay.
  9. Hourly rate $12.00
  10. Overtime should be calculated at time and a half after 40 hours

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

Students also viewed these Programming questions