Answer:
polygon_sides = {"Triangle" : 3,"Square" : 5}
n_polygons = {}
for key in polygon_sides:
n_polygons[polygon_sides[key]] = key
print("Polygon sides: ", polygon_sides)
print("Names of polygons: ", n_polygons)
Step-by-step explanation:
- Initialize the polygon_sides dictionary.
- Loop through polygon_sides dictionary and assign the associated names to n_polygons variable.
- Display the polygon sides and the names of polygons.