Which of the following statements about 2D arrays in Python is true?
What is the correct way to access an element in a 2D array in Python?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the time complexity for accessing an element in a 2D array?
Which module in Python provides functions to work with 2D arrays efficiently?
Which of the following methods can be used to iterate over all elements in a 2D array?
What will be the output of the following code snippet?
array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print(array[1][2])
What will be the output of the following code snippet?
array = [[1, 2], [3, 4]]
print(len(array))
What will be the output of the following code snippet?
array = [[1, 2, 3], [4, 5, 6]]
print(sum(array[0]))
What will be the output of the following code snippet?
array = [[1, 2, 3], [4, 5, 6]]
print(max(array[1]))
What will be the output of the following code snippet?
array = [[1, 2], [3, 4]]
print(array[-1][-1])
Given a 2D array "matrix" of size m x n, how would you swap the elements of the matrix diagonally?
Given a 2D array "matrix" of size m x n, how would you calculate the sum of all elements in the matrix?
Given a 2D array "matrix" of size m x n, how would you find the row with the highest sum of elements?
Given a 2D array "matrix" of size m x n, how would you check if the matrix is symmetric?
Given a 2D array "matrix" of size m x n, how would you rotate the matrix 90 degrees clockwise?
49 videos|38 docs|18 tests
|
49 videos|38 docs|18 tests
|