Question: 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
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([[0,0,0],[0,0,0]] None highest_point([[2,5,1],[9,7,6]] (1,0) # row 1, column 0 has the highest land. highest_point([[1,6,1],[6,2,3]] (0,1) # 6 is highest land; first occurrence at (0,1)
Restrictions no modules may be imported. you may only use built-in functions and methods explicitly listed below in the allowed section. list comprehensions and lambdas may not be used on this project.
Allowed basic statements, variables, operators, del, indexing, slicing, in, are all allowed any form of control flow we've covered is allowed (if/else, loops, etc) only these built-in functions: range(), len(), int(), str(), type(), list() only these built-in methods: s.split(), s.join(), s.pop(), xs.append(), xs.extend(), xs.insert(), s.format()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
