Question: PYTHON 3.X Input a list of employee names and salaries stored in parallel arrays . The salaries should be floating point numbers in increments of
PYTHON 3.X
Input a list of employee names and salaries stored in parallel arrays. The salaries should be floating point numbers in increments of 1000 (note: the book says 100, but it is wrong). For example, a salary of $36,000 should be input as 36.0 and a salary of $85,900 should be input as 85.9. Find the mean (average) salary without using any Python sum or average functions and display the names and salaries of employees who earn within a range of $5,000 from the mean. In other words, if the mean salary is $45,000, all employees who earn between $40,000 and $50,000 should be displayed. Don't forget to use a main() function and any other functions as needed such as one that gets integers.
python sample interaction:
Please enter the employee name or * to finish: Dave Please enter the salary in thousands for Dave: 50 Please enter the employee name or * to finish: Edward Please enter the salary in thousands for Edward: 48 Please enter the employee name or * to finish: Frank Please enter the salary in thousands for Frank: 52 Please enter the employee name or * to finish: George Please enter the salary in thousands for George: 0.010 Please enter the employee name or * to finish: Harry Please enter the salary in thousands for Harry: 100 Please enter the employee name or * to finish: * Dave, 50000.00 Edward, 48000.00 Frank, 52000.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
