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 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]
media%2F736%2F7369362e-a862-40b2-a00e-ee
0 0
Add a comment Improve this question Transcribed image text
Answer #1

/*If you any query do comment in the comment section else like the solution*/

1. print(d2['computer'])

2. d2['computer'].append(200)

print(d2['computer'])

Add a comment
Know the answer?
Add Answer to:
Python Question 5 2 pts We have a dictionary d2 (NOTE THE VARIABLE NAME CHANGE), defined...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT