There are 6 employees. Write a program with nested loops, to ask the yearly salary of each employee for 5 years. Your program should keep track of the highest salary,

There are 6 employees. Write a program with nested loops, to ask the yearly salary of each employee for 5 years.  Your program should keep track of the highest salary, lowest salary, and  calculate the average salary  of each employee. After you collect each employees data, display the highest salary, lowest salary, and   average salary for that employee. The outer loop is used to keep track of employees, and the inner loop is used to keep track of years for each employee of the outer loop. In the test case below, note that the employee count and year count keeps changing for input message and output messages You can accomplish this by using an input and print statement like: salary=input(” enter employee “+ str(empcount) +” salary for year ” + str( yearcount) + “: “) print(“Employee ” + str(empcount) + ” smallest salary is: $”+str(smallest) ) To calculate the average with decimal point, you can use statement like below. avg=float(totalsal)/5 The above nstructions are examples. Of course, you must replace the variables with the variables used in your program. the output has to be like this example Purchase the answer to view it

Do you need us to help you on this or any other assignment?


Make an Order Now