Question: Hi can you help me using python is hard Assume that a file containing employee records is named employees.txt and exists on your computer's disk.
Hi can you help me using python is hard
Assume that a file containing employee records is named employees.txt and exists on your computer's disk. Each employee record occupies two lines; one contains employee's name and the other one contains employee's salary. Write a program to read out all such records stored in employees.txt, and display a table of employee names and salaries. At the bottom of the table, you also have to display the average of employee salaries. A sample file is provided for your unit testing. However, the instructor will put different records in employees.txt for testing your submitted program. User interface specifications: Output The employee table shall have two columns and have appropriate headers. Each column of the table must be aligned. The first column is for employee names and the second column is for employee salaries. The average of employee salaries. Testing: Develop at least 2 test cases, calculate the correct results by hand, and then confirm that your program gives the same results. Assume that a file containing employee records is named employees.txt and exists on your computer's disk. Each employee record occupies two lines; one contains employee's name and the other one contains employee's salary. Write a program to read out all such records stored in employees.txt, and display a table of employee names and salaries. At the bottom of the table, you also have to display the average of employee salaries. A sample file is provided for your unit testing. However, the instructor will put different records in employees.txt for testing your submitted program. User interface specifications: Output The employee table shall have two columns and have appropriate headers. Each column of the table must be aligned. The first column is for employee names and the second column is for employee salaries. The average of employee salaries. Testing: Develop at least 2 test cases, calculate the correct results by hand, and then confirm that your program gives the same results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
