निम्नलिखित कोड के लिए आउटपुट क्या होगा?
What will be output for the following code ?
import numpy as np
a = np.array([11,2,3])
print(a.min()) A
2
B
1
C
11
D
3
Explanation
Let's break down the code:
import numpy as np
a = np.array([11, 2, 3])
print(a.min())
Explanation:
-
a = np.array([11, 2, 3])creates a NumPy array with the elements[11, 2, 3]. -
a.min()finds the minimum value in the array.
So, the minimum value in the array [11, 2, 3] is 2.
Answer:
(A) 2
Correct Answer: A) 2