00:01
Hello for this problem for exercise 13.
00:05
You're asked to write a function that will return the location of the largest element in a two -dimensional list, where the return value is a one -dimensional list that contains two elements.
00:23
So here i've defined our function, locate largest of a.
00:27
And i'm going to just start by saying that the element at zero -zero is the largest.
00:35
Our row then is zero and column is zero.
00:38
Now we want to iterate through the two -dimensional list.
00:43
So for i in range length a and for j in range length a of i, if that element is larger, sorry, than largest, then we need to update largest.
00:59
So largest will be now equal to that element, row will be equal to i, and column will be equal to j.
01:05
And so we'll iterate all the way through and return row column.
01:11
We're also asked to write a test program that will prompt the user to enter a two -dimensional list and display the location of the largest element in the list.
01:21
So in order to do that, i have started by setting rows equal to the input from the user of how many rows will be in the list.
01:32
We will initialize a matrix as just being an empty list here...