Question: Create two lists. One should be named employees and should contain the names of the employees as strings. The second should be named years and

Create two lists. One should be named employees and should contain the names of the employees as strings. The
second should be named years and should contain the number of years of service for each employee, stored as
integers.
The lists should be created in "parallel" so that the values in the two lists at a particular index refer to the same person.
The lists should be ordered in decreasing order of service. The person with the greatest number of years of service
should appear first in the list, and the person with the fewest years of service should appear last in the list. You should
perform this sorting manually when creating the lists rather than using sorting functions. This problem is intended to
give you practice with inserting and removing elements from lists.
You do not need to print anything in this cell.
Suppose that two employees from other departments transfer to this department. The new members are named Gina
and Herb. Gina has 12 years of service at the company and Herb has 3 years of experience.
The company also hires a new employee, Iris, to join the department. Iris has 0 years of experience with the company.
Update employees and years to include these new members. The updates should be performed so that they are still
ordered by years of service, in decreasing order.
Print both lists.

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 Databases Questions!