Question: Need help implemeting list map functions in python def show(map): Given a map, create and return a string that, when printed is formatted like the
Need help implemeting list map functions in python

def show(map): Given a map, create and return a string that, when printed is formatted like the example below, in a nice multi-line output containing only digits and spaces. this function doesn't need to be called by any others, but is useful when testing your other definitions manually values in the same row are separated by a single space. (Note-no space at the end of the line). each value uses just enough characters for the largest value in the entire map, by using extra spaces to the left of any number that didn't take as many spaces to print. If everything's the same number of digits, we wouldn't need any of these extra spaces. each line ends with a digit from the last column, and then a newline, without any extra spaces. Assume: map is a map as defined above. show(I[1, 2, 5],[ 10, 11, 8]]) - " 1 2 5n10 11 81n" 8421 svallar. >print (show([[1, 2, 5],[ 10, 11, 8]])) 1 2 5 10 11 8 # 11 is the biggest number; it needs two columns to display, so all numbers need two # characters -in this case, single-digit numbers needed a single Leading space. def highest_point (map): Given a map, where is the highest point of land? If there is no land, return None. Otherwise, respond with a tuple of the row and column where we can find the highest point (don't use any negative indexes in your answers). If there is a tie, return the location with the lowest row-index, and the lowest column-index as a further tie breaker. (The earlier row wins, and in further ties the earlier column wins). . Assume: map is a map as defined above. . highest-point([[e,0,0],[e,0,0]] . highest-point([ [2,5,1], [9,7,6]] . highest-point([[ 1,6, 1],[6,2,3]] None (1,0) # row 1, column e has the highest land. (8,1) # 6 is highest land; first occurrence at (0.1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
