and returns a nested listof integers such that each element in the returned list representscoordinates where a positive value is in .>>> lst = [[6, -4, 0], [-2, -10, 8, -71], [99, 43], 0, [-5]]>>>...


Given the following incomplete Python function find_positive_value_coordinates , fill in the blanks so that the<br>function behaves as the type contract, docstring, and sample test cases expect.<br>def find_positive_value_coordinates(lst: list[list[int]]) -โ†’ list[list[int]]:<br>Takes in a nested list of integers <lst> and returns a nested list<br>of integers such that each element in the returned list represents<br>coordinates where a positive value is in <lst>.<br>>>> lst = [[6, -4, 0], [-2, -10, 8, -71], [99, 43], 0, [-5]]<br>>>> find_positive_value_coordinates(lst)<br>[[0, 0], [1, 2], [2, 0], [2, 1]]<br>>>> lst = [[1, 2], [3, 4]]<br>>>> find_positive_value_coordinates(lst)<br>[[0, 0], [0, 1], [1, 0], [1, 1]]<br>>>> lst = [[-1, -2], [-3, -4]]<br>>> find_positive_value_coordinates(lst)<br>[]<br>%3D<br>coordinates = []<br>for i in [BLANK_1]:<br>for j in [BLANK_2]:<br>if [BLANK_3]:<br>coordinates. [BLANK_4]<br>return coordinates<br>Please note: BLANK_1 through BLANK_4 are just placeholders that you are required to fill in using the drop-<br>down options presented to you.<br>BLANK_1: [Select ]<br>BLANK_2: [ Select ]<br>BLANK_3:<br>[ Select ]<br>BLANK_4: [Select ]<br>><br>><br>

Extracted text: Given the following incomplete Python function find_positive_value_coordinates , fill in the blanks so that the function behaves as the type contract, docstring, and sample test cases expect. def find_positive_value_coordinates(lst: list[list[int]]) -โ†’ list[list[int]]: Takes in a nested list of integers and returns a nested list of integers such that each element in the returned list represents coordinates where a positive value is in . >>> lst = [[6, -4, 0], [-2, -10, 8, -71], [99, 43], 0, [-5]] >>> find_positive_value_coordinates(lst) [[0, 0], [1, 2], [2, 0], [2, 1]] >>> lst = [[1, 2], [3, 4]] >>> find_positive_value_coordinates(lst) [[0, 0], [0, 1], [1, 0], [1, 1]] >>> lst = [[-1, -2], [-3, -4]] >> find_positive_value_coordinates(lst) [] %3D coordinates = [] for i in [BLANK_1]: for j in [BLANK_2]: if [BLANK_3]: coordinates. [BLANK_4] return coordinates Please note: BLANK_1 through BLANK_4 are just placeholders that you are required to fill in using the drop- down options presented to you. BLANK_1: [Select ] BLANK_2: [ Select ] BLANK_3: [ Select ] BLANK_4: [Select ] > >
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here