Cuyamaca College Python Programming Simulation of A Database Code
Programming Assignment #2: simulation of a database .
Upload program and execution as 2 separate files in canvas
1. Build a list of lists called emp, using the data in file empInsert, shown in canvas files. For
reference, I use the words “table”, “row”, and “column” , for the”2 dimensional” list emp.
For reference, I use the following names (or similar names) for columns: employee_number,
employee name, job, supervisor, hiredate, salary, commission, department numbers (those
names of columns are not necessarily used in the Python program . For example, row number
one will have the following data: 8369, 'THOMAS', 'SECRETARY', 8902, '17-DEC-1990', 1400, null,
20. To build the table emp in the Python program, copy and paste one row at a time from the
file empInsert into the table emp (again, “table” is not a standard Python keyword, I use it to
represent a list of lists or 2-dimensional list). Assumption about the data: names of employees
are unique, employee numbers are unique
2. Print table emp, showing one row per line
3. Print names of employees in alphabetical order
4. Compute and print the incomes for Richard, Mary , and Sean (income is sum of salary, 6th
column and commission, 7th columnIn this assignment, null will be a variable set to 0
5. Build a list of three columns: job (column 3 in emp), total salary for employees with all
employees with this job this job (ignore commission), and avreage salary for this job. Print
in table form
6. The first column of emp is the employee number. The 4th column is the employee number
of the employee’s supervisor. For example, row 1, Thomas has for supervisor Sean
(employee number 8902). Build a list of all employees and their supervisor (2 columns,
employee name, supervisor name)). Print in alphabetical order on employeee name
7. Extra-credit: Build the table dept from the data in file deptInsert (in canvas). Print it (one
row per line). The department number of the table emp (last column) refers to the
department number of first column in dept. For example THOMAS works in department
number 20, which is the RESEARCH department, as showm in table dept. Build a table of
two columns. Column 1 : employee name . Column 2: department name. Print the table,
oe row per line
Whenever possible, program statements must not be based on data you can look at in the two
tables, but based on legitimate computations.
Make the output easy to read, but do not complicate the program with fancy output. Do not
validate the data.
There is no input statements in this program. The data are directly copied into the lists emp
and dept from data in in files empInsert and deptInsert
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.