Question: Write a Python program to manage employee records using a table data structure. The program should read employee records from an input file ( as

Write a Python program to manage employee records using a table data structure. The program should read employee records from an input file (as shown in Figure 3) and provide the following functionalities:
> A function 'display()' to display employee records by a given department name: display the table of employee records from the given department, including column headers; as shown in sample output Figure 4.
Main function: opens and reads employee records into a table. Then find the grade of the employee based on his/her salary and add it to the table as 4th column, as follow:
Grade C: Salary less than $1,000
Employee Name; Department; Salary
Ahmed Al-Awfi; COMP; 3200.99
Salah Al-Sinani ; COMP; 2075
Rashid Al-Ali ; Admin; 1931.4
Kamla Al-Subhi ; Admin; 815
Hind Al-Wardi ; COMP; 986.5
Said Al-Mosa; Finance; 3130.2
Figure 3 sample input file 'students.txt'
Grade B: Salary in the range $1,000,$3,000
Grade A: Salary greater than $3,000
Prompt user for the department name and display employee records from the given department if exist by calling the 'display()' function.
Enter student cohort: Store No one in this Department
Figure 4 sample output runs
Write a Python program to manage employee records

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!