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
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
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images