This assignment assesses your skills and knowledge on constructing code to manip
This assignment assesses your skills and knowledge on constructing code to manipulate the content of a dictionary.
In this unit, we have explored the fundamental concepts of Iterations and Strings in Python. Before you proceed with this assignment, please review the reading material listed below: Think Python: How to think like a computer scientist : Chapter 11 – Dictionaries Python Beginner Tutorial 8 – For loop, Lists, and Dictionaries Please ensure that you review all examples presented in the Chapter before you work on this assignment. In a program, a dictionary contains lists of students and their courses. The teacher is interested to have a dictionary that has the courses as key and the students enrolled in each course as values. Each key has three different values. To address this requirement, write a function to invert the dictionary and implement a solution that satisfies the teacher’s need. In particular, the function will need to turn each of the list items into separate keys in the inverted dictionary. Also provide a technical explanation for the code and its output in minimum 200 words. Sample input: { ‘Stud1: [‘CS1101’, ‘CS2402’, ‘CS2001’], ‘Stud2: [‘CS2402’,’CS2001’,’CS1102’] } Inverted Output: { ‘CS1101’: [‘Stud1’], ‘CS2402’:[‘Stud1’,’Stud2’], ‘CS2001’: [‘Stud1’,’Stud2’] ‘CS 1102’[‘Stud2’] } Programming Instructions: Print the original dictionary as well as the inverted dictionary. Include your the Python program and the output in your submission. The code and its output must be explained technically. The explanation can be provided before or after the code, or in the form of comments within the code. Submission Instructions:Submit the solution in a word document. Make sure your submission is double-spaced, using Times New Roman, 12-point font, with 1” margins. Use sources to support your arguments. Add a reference list at the end of the submission. For assistance with APA formatting, view the Learning Resource Center: Academic Writing. Your submission should be clearly written, concise, and well organized, and free of spelling and grammar errors. Read the grading rubric to understand on how your work will be evaluated. References: Downey, A. (2015). Think Python: How to think like a computer scientist (2nd ed.). Green Tea Press. kjdElectronics. (2017, August 5). Python beginner tutorial 8 – For loop, lists, and dictionaries [Video]. YouTube. https://youtu.be/bE6mSBNp4YU Raj, A. (2022, March 3). Reverse a dictionary in Python. PythonForBeginners. Python Dictionaries. (n.d.). W3schools.