Question: PYTHON 3.0 HELP (NOT JAVA) -The inverse of a map is a new map where the values of the original map become the keys of
PYTHON 3.0 HELP (NOT JAVA)
-The inverse of a map is a new map where the values of the original map become the keys of the new map and the keys become the values. For example, given the map {1:2, 3:4}, the inverse is the map {2:1, 4:3}. Given the map, d, create the inverse of d. Associate the new map with the variable inverse. You may assume that there are no duplicate values in d (that is no two keys in d map to the same value).
-Given a variable, province_premier, that is associated with a dictionary that maps the province names to the names of province premiers, associate with premier_province a dictionary that is the inverse of province_premier, i.e. one that maps names of premiers to province names.
-Given a variable, polygon_sides, that is associated with a dictionary that maps names of polygons to number of sides, create a new dictionary that maps number of sides to polygon names, and associate it with a variable n_polygons.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
