Respuesta :
Answer:
def element_loc():
is_end = 'n'
dimen2 = []
while is_end == 'n':
par1 = input("Enter rows and columns: ").split(",")
part = [int(i) for i in par1]
dimen2. append(part)
is_end = input("Do you want to add more rows? y/n: ")
mini = list()
for i in dimen2:
mini. append(min(i))
result = min(mini)
row_index = mini. index(result)
col_index = dimen2[row_index]. index(result)
print("Row: ", row_index, "Col_index: ", col_index)
element_loc()
Explanation:
The python program solution above prompts users for the two-dimensional array and then the rows of the array are compared with the minimum value stored in another list or array. The row index and the column index are gotten from the mini and dimen2 arrays respectively and are displayed as the position of the minimum value in the two-dimensional array.