CodeLab Solution 51831

CS101 CodeLab Solutions

CodeLab Solution 51831

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.

[cc lang=”PYTHON”] n_polygons={x:y for y,x in polygon_sides.items()}

No Comments Yet.

Leave a comment

You must be Logged in to post a comment.