page-banner
Chapter-9 NumPy Basics
Q16.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3, 5, 8])
b = np.array([0, 1, 5, 4, 2])
c = a + b
c = c * a
print(c[2])
A. 6
B. 24
D. None of these
View Answer
Q17.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3]])
print(a.shape)
A. (2, 3)
B. (3, 1)
C. (1, 3)
D. None of these
View Answer
Q18.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
a = np.array([1, 5, 4, 7, 8])
a = a + 1
print(a[1])
A. 4
B. 5
C. 6
D. 7
View Answer
Q19.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
print(np.maximum([2, 3, 4], [1, 5, 2]))
A. [1 5 2]
B. [1 5 4]
C. [2 3 4]
D. [2 5 4]
View Answer
Q20.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
a = np.array([2, 3, 4, 5])
b = np.arange(4)
print(a + b)
A. [2 3 4 5]
B. [3 4 5 6]
C. [1 2 3 4]
D. [2 4 6 8]
View Answer

Create Account