Question: Language used is Python 2 (a) Write a function called map_dict that: 1. Creates a dictionary containing 25 key/value pairs labeling the map spaces. a.
Language used is Python 2

(a) Write a function called map_dict that: 1. Creates a dictionary containing 25 key/value pairs labeling the map spaces. a. Key: string label, e.g., "Al", "A2", "E5" b. Value: the tuple containing the tuple of coordinates for that space. c. Prints this dictionary. (You may also return the dictionary as a value.) (b) Write a function called manhattan_dist that: 1. Takes two map coordinate labels as arguments. 2. Calculates the Manhattan distance between those coordinates: the number of steps you would have to take to get between them if you cannot go diagonally. 3.Prints and returns this distance. Here is an example of one possible output: manhattan_dist("Al ", "D4") rightarrow 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
