Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program in Python 2 Please !!!!!!! There are 6 employees. Write a program with nested loops, to ask the yearly salary of each employee for

Program in Python 2 Please !!!!!!!

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.

Hints: 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, please 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("Please 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.

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

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

How can MNCs reduce operating expenses relative to domestic firms?

Answered: 1 week ago

Question

Explain how ethical decision making can be encouraged.

Answered: 1 week ago