Question 17
Consider the following snippet: def ProcedureOne(M): n = len(M) for i in range(n): temp = M[i][i] M[i][i] = M[i][-i - 1] M[i][-i - 1] = temp return M def ProcedureTwo(M): p = 1 n = len(M) for i in range(n): p *= M[i][i] return p M = [[2, 4, 6], [8, 10, 12], [14, 16, 18]] P = ProcedureOne(M) print(P) print(ProcedureTwo(P)) Based on the above code answer the subsequent questions.
What is the first line of output?
[[6, 4, 2], [8, 10, 12], [18, 16, 14]]
[[2, 4, 6], [8, 10, 12], [14, 16, 18]]
[[14, 16, 18], [8, 10, 12], [2, 4, 6]]
[[2, 6, 4], [8, 12, 10], [14, 18, 16]]