निम्नलिखित NumPy कोड का आउटपुट क्या होगा?
What is the output of the following NumPy code?
arr = np.array([1,2,3,4,5])
print(np.sum(arr))
A
10
B
15
C
12
D
20
Explanation
Given NumPy code:
import numpy as np
arr = np.array([1, 2, 3, 4, 5])
print(np.sum(arr))
🔸 np.sum(arr) क्या करता है?
यह function array के सभी elements का योग (sum) करता है:
1 + 2 + 3 + 4 + 5 = 15
✅ Final Output: 15
Correct Answer: B) 15