Computer Science Homework Help

Harvard Business School Databases Programs

Get Your Custom Essay Written From Scratch
We have worked on a similar problem. If you need help click order now button and submit your assignment instructions.
Just from $13/Page
Order Now

This assignment consists of 2 separate programs.

Program 1 (worth 2/10)

a. Write the data of table emp (assignment 2) to a “csv” file. One row of emp will be one row in the file. The file should appear as an Excel speadsheet with 8 columns and 14 rows.

b. Keep the following 5 columns (direct manipulation of the file, not part of the program): employee name , job, salary, commission, department name. For example, the first row of data of this file is:

THOMAS

SECRETARY

1400

0

20

Program 2 (worth 8/10)

a. Read the file into a list of lists (14 rows, 5 columns)

b. Transform each row of the list into a dictionary. The keys are : ename, job, salary, comm, dno. Call the resulting list of dictionaries dict_of_emp

c. Display the table dict_of_emp, one row per line

d. Perform the following computations on dict_of_emp:

D1. Compute and print the incomes of Richard and Mary (add salary and comm)

D2 Compute and display the sum of salaries paid to each type of job (i.e. salary paid to analysts is 3500 + 3500= 7000)

D3. Add 5000 to the salaries of employees in department 30. Display the new table