please solve these 1. Create three dictionaries: dic1 = {1:10, 2:20} dic2 = {3:30, 4:40} dic3 = {5:50, 6:60} (a) Write code to concatenate these dictionaries to create a new one. Create a variable called nums to store the resulting dictionary. There are multiple ways to do this, however, one of the easiest is to convert each of the dictionaries items to a list (which can be added together) and pass them to the dict() constructor. (b) Write code to add a new key/value pair to the dictionary nums: (7, 70) (c) Write code to update the value of the item with key 3 in nums to 80
please solve these
1. Create three dictionaries:
dic1 = {1:10, 2:20}
dic2 = {3:30, 4:40}
dic3 = {5:50, 6:60}
(a) Write code to concatenate these dictionaries to create a new one. Create a
variable called nums to store the resulting dictionary. There are multiple ways to
do this, however, one of the easiest is to convert each of the dictionaries items to a
list (which can be added together) and pass them to the dict() constructor.
(b) Write code to add a new key/value pair to the dictionary nums: (7, 70)
(c) Write code to update the value of the item with key 3 in nums to 80
(d) Write code to remove the third item from dictionary nums.
(e) Write code to sum all the items in the dictionary nums
(f) Write code to multiply all the items in the dictionary nums
(g) Write code to retrieve the maximum and minimum values in nums.
Step by step
Solved in 2 steps with 1 images