learn To program: The Fundamentals Week 7 Answers
Question 1 Consider this code: >>> d = {'a': 1, 'b': 2} >>> # CODE MISSING HERE >>> d {'a': 1, 'c': 3, 'b': 2} Write the missing assignment statement that that modifies the dictionary as shown. (Just write the assignment statement; don't write the >>> part.) You entered: Your Answer Score Explanation d['c'] = 3 Correct 1.00 Total 1.00 / 1.00 Question Explanation You need to add 'c' as a key and 3 as the value associated with that key. Question 2 Consider this code: >>> d = {'a': 1, 'b': 2} >>> # CODE MISSING HERE >>> d {'a': 1, 'b': 3} Write the missing assignment statement that modifies the dictionary as shown. (Just write the assignment statement; don't write the >>> part.) You entered: Your Answer Score Explanation d['b'] = 3 Correct 1.00 Total 1.00 / 1.00 Question Expla...
Share assignment 1 also
ReplyDelete