निम्नलिखित कोड का परिणाम क्या है ? एनपी के रूप में सुन्न आयात करें
What is the output of the following code ?
import numpy as np
a = np.array([1,2,3,5,8])
b = np.array([0,3,4,2,1])
c = a + b
c = c*a
print (c[2]) A
10
B
21
C
12
D
28
Explanation
Sure!
c = a + b→[1, 5, 7, 7, 9]c = c * a→[1, 10, 21, 35, 72]c[2]is21.
Answer: (B) 21.
Correct Answer: C) 12