Please written by computer source Python asignment For this assignment you are to implement a program that computes the salaries for a set of employees. The program should begin by asking the user if there is an employee for which a salary is to be computed. If the user responds in the affirmative by inputting “yes” (in lowercase) the program should prompt the user to input the employee’s hourly pay rate and the number of hours worked by that employee. There should be a separate prompt for each of these two values. Once this data has been input, the program should compute the employee’s salary as the product of the hourly pay rate and the number of hours worked for the first 40 hours worked (i.e., straight time), plus time-and-a-half for those hours exceeding 40, and then output the result in a user-friendly format. Once the salary for the employee has been computed and output, the program should then ask the user if a salary should be computed for another employee. If again the user again responds in the affirmative, by inputting “yes,” the program should process the data for this employee. This process should continue until the user responds in the negative by inputting “no” in response to prompt asking if there is an employee for which a salary is to be computed. If the user inputs a response other than “yes” or “no,” The program should indicate to the user that the repsonse is invalid, and that they should input either “yes” or “no,” and continue to do so until the user inputs a valid response. Once the user inputs “no,” indicating that there is no more employee data to be processed, the program should output the total count of the number of employees for which salaries were computed, and the total of these salaries, and then terminate

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question

Please written by computer source

Python asignment

For this assignment you are to implement a program that computes the salaries for a set of employees.

The program should begin by asking the user if there is an employee for which a salary is to be computed. If the user responds in the affirmative by inputting “yes” (in lowercase) the program should prompt the user to input the employee’s hourly pay rate and the number of hours worked by that employee. There should be a separate prompt for each of these two values. Once this data has been input, the program should compute the employee’s salary as the product of the hourly pay rate and the number of hours worked for the first 40 hours worked (i.e., straight time), plus time-and-a-half for those hours exceeding 40, and then output the result in a user-friendly format.

Once the salary for the employee has been computed and output, the program should then ask the user if a salary should be computed for another employee. If again the user again responds in the affirmative, by inputting “yes,” the program should process the data for this employee.

This process should continue until the user responds in the negative by inputting “no” in response to prompt asking if there is an employee for which a salary is to be computed. If the user inputs a response other than “yes” or “no,” The program should indicate to the user that the repsonse is invalid, and that they should input either “yes” or “no,” and continue to do so until the user inputs a valid response.

Once the user inputs “no,” indicating that there is no more employee data to be processed, the program should output the total count of the number of employees for which salaries were computed, and the total of these salaries, and then terminate

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr