Complete the code to access the element at row 1, column 2 in the numpy array.
import numpy as np arr = np.array([[1, 2, 3], [4, 5, 6]]) element = arr[1]
The element at row 1, column 2 is accessed using arr[1, 2].
Complete the code to get the element at the first row and last column of the array.
import numpy as np arr = np.array([[7, 8, 9], [10, 11, 12]]) element = arr[1]
The first row is index 0 and the last column can be accessed with index -1.
Fix the error in the code to correctly access the element at row 2, column 0.
import numpy as np arr = np.array([[1, 2], [3, 4], [5, 6]]) element = arr[1]
Use square brackets with two indices separated by a comma: arr[2, 0].
Fill both blanks to create a dictionary with words as keys and their lengths as values, but only for words longer than 3 letters.
words = ['apple', 'bat', 'carrot', 'dog'] lengths = {word: [1] for word in words if [2]
Use len(word) to get the length and filter words with length greater than 3.
Fill all three blanks to create a dictionary with uppercase words as keys and their lengths as values, only for words longer than 4 letters.
words = ['tree', 'house', 'car', 'elephant'] result = { [1]: [2] for word in words if [3] }
Use word.upper() as key, len(word) as value, and filter words with length greater than 4.