Question: def find_land(map, r, c, dir): Given a map and location, as well as a direction to look (one of [N,NE,E,SE,S,SW,W,NW]), indicate how many spaces we
def find_land(map, r, c, dir): Given a map and location, as well as a direction to look (one of ["N","NE","E","SE","S","SW","W","NW"]), indicate how many spaces we must travel on the map to reach land. If we're on land, the answer is zero. If there's no land in that direction on this map, we return None. Assume: map is a map as defined above, r and c are int values, and dir is one of the strings above. find_land(map4,2,2,"S") 2 find_land(map4,4,1,"NE") None find_land(map5,7,0,"N") 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
