Home »
Python »
Python NumPy MCQs
Observe the following code and identify what will be the outcome (3)?
8. Observe the following code and identify what will be the outcome?
import numpy as np
a = np.array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]])
b = a
b is a
- True
- False
Answer: A) True
Explanation:
In the above code, the matrix has assigned to the variable a and then copy it to the variable b. Hence, when we will run the code it will print true i.e Boolean value.