Question: Write a separate function (not part of the Employee class) named make_employee_dict that takes as parameters a list of names, a list of ID numbers,
Write a separate function (not part of the Employee class) namedmake_employee_dictthat takes as parameters a list of names, a list of ID numbers, a list of salaries and a list of email addresses (which are all the same length). The function should take the first value of each list and use them to create an Employee object. It should do the same with the second value of each list, etc. to the end of the lists. As it creates these objects, it should add them to a dictionary, where the key is the ID number and the value for that key is the whole Employee object. The function should return the resulting dictionary.
For example, it could be used like this:
emp_names = ["Jean", "Kat", "Pomona"]emp_ids = ["100", "101", "102"]emp_sals = [30, 35, 28]emp_emails = ["Jean@aol.com", "Kat@aol.com", "Pomona@aol.com"]result = make_employee_dict(emp_names, emp_ids, emp_sals, emp_emails)Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
