Programming Homework Help

Cuyamaca College Python Program Project

 

I’m working on a python question and need an explanation and answer to help me learn.

Programmming Assignment #3: Files and dictionaries
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
Deliverables. Upload to canvas the following files:
program1 listing, ouput of program1, 5-column excel file of program1.b
program 2 listing, output of program 2