Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 14 - Tuples, Sets, and Dictionaries - Section 14.6 - Dictionaries - Check Point - MyProgrammingLab - Page 492: 14.21

Answer

(a) students["susan"] = 5, This will add a new key "susan" and assign a value of 5 to it. (b) students["peter"] = 5, This will update the value of existing key to 5 (c) students["peter"] += 5, This will add 5 to the value of the key "peter" (d) del students["peter"], This will delete the key "peter" and it's value The final value of dictionary will be {'john': 3, 'susan': 5}

Work Step by Step

No explanation needed.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.