Question Part (a)- The List Operations for Employee Data: The task description- well, as a Data Analyst in an organization, and the HR department needs me to perform numerous operations on a list of employee names as below. Create a list of 10 employee names. Split the list into two sub-lists, each containing 5 names. Add a new employee, "Kriti Brown", to subList2. Remove the second employee's name from subList1. Merge both the lists. Assume a salary list for these employees, give a 4% rise, and update the list. Sort the updated salary list alongside to show the top 3 salaries. >>>Python Code alongside, Explanation: >>>python >>># Initial list of employee names employee list = ["Tumusiime", "Tushabe", "Tumwine", "Tumwabaze", "Asiimwe", "Atuharwa", "Angela", "Judith", "Edith", "Akankwasa"] >>># Split the list into two sub-lists >>>subList1 = employee_list[:5] >>>subList2 = employee_list[
>>># Remove …show more content…
Create the list- Indeed, I start with a list of 10 employee names: Tumusiime, Tushabe, Tumwine, Tumwabaze, Asiimwe, Atuharwa, Angela, Judith, Edith, and Akankwasa. Splitting the list- Utilization, list slicing, I divide the list into two sub-lists, subList1 and subList2. Adding a new employee: I use the append method to add "Kriti Brown" to subList2. Removing an employee: The pop method removes the employee at index 1 (the second employee) from subList1. Merging the lists: I concatenate subList1 and subList2 using the + operator. Salary update: I assume a list of salaries and apply a 4% increase to each salary using a list comprehension. Sorting salaries: The updated salaries are sorted in descending order, and we extract the top 3 salaries. Downey, A. (2015). The 'Secondary' of the 'Secondary' of the 'Secondary' of the 'Secondary' of the 'Secondary' of the 'Secondary' of the 'Secondary' of the 'Secondary' of the