Direction: Choose the correct option
Q1.
Given `a = np.array([1,2,3,4,5])`, what does `a[2]` return?
Direction: Choose the correct option
Q2.
What does `a[-1]` do in a NumPy array?
Direction: Choose the correct option
Q3.
Given `a = np.array([1,2,3,4,5])`, what is the result of `a[1:4]`?
Direction: Choose the correct option
Q4.
For a 2D array `a`, what does `a[0,1]` access?
Direction: Choose the correct option
Q5.
What does `a[:, 0]` do for a 2D array?
Direction: Choose the correct option
Q6.
How do you select rows 1 to 2 and columns 2 to 3 in a 2D array `a`?
Direction: Choose the correct option
Q7.
What is the result of `a[::2]` for a 1D array?
Direction: Choose the correct option
Q8.
Boolean indexing: `a[a > 2]` returns
Direction: Choose the correct option
Q9.
Given `a = np.arange(12).reshape(3,4)`, what is the shape of `a[1]`?
Direction: Choose the correct option
Q10.
What does `np.where(a > 5)` return?
