1. What does np.array([1, 2, 3]) create?

A) A Python list

B) A NumPy 1D array

C) A 2D matrix

D) A tuple

B) A NumPy 1D array


2. How do you create a 3x3 identity matrix?

A) np.eye(3)

B) np.identity(3)

C) np.ones((3, 3))

D) Both A and B

D) Both A and B


3. What is the output of np.arange(5)?

A) [0, 1, 2, 3, 4]

B) [1, 2, 3, 4, 5]

C) [5]

D) Error