What is the output of the following?
2023
What is the output of the following?
- A.
[[3 4]
[10 20]]
- B.
[[3 4]
[11 21]]
- C.
[[2 3]
[11 21]] - D.
[[3 3]
[11 20]]
Attempted by 1242 students.
Show answer & explanation
Correct answer: B
Explanation: Adding a scalar to a NumPy array is applied element-wise, so 1 is added to each element of the array. Printed output: [[ 3 4] [11 21]]