Question: Python Question 5 2 pts We have a dictionary d2 (NOTE THE VARIABLE NAME CHANGE), defined as follows, which maps words to the pages in
Question 5 2 pts We have a dictionary d2 (NOTE THE VARIABLE NAME CHANGE), defined as follows, which maps words to the pages in a book that contain those words: d2-computer': [e, 11), programming [1, 19, 41, 60, 65, 89], is: [2, 54, 66], the: [3, 34, 48, 62, 76, 86, 1e1], process': [4, 87], of: [S, 36, 51, 64, 71, 78, 88, 10e], designing [6], and' [7, 30, 33, 1e6], building [8], an [9], executable': [10], program': [12, 53] What code would you write to do the following thing Get the page numbers associated with the word "computer" in the dictionary Make sure you put spaces in between your operators and variables (this makes autograding more straightforward; will still fix if you have the right code but with slightly different spacing, but I might be a little grumpy). E.g., do this new list [3, 7, '2 Instead of this new_list-357, '2]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
