NumPy MCQ
1 .
What will be printed? 
 
 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])

Correct Answer : Option (B) :   21

  Show Answer
2 .
What will be output for the following code? 
 
 import numpy as np
 ary = np.array([1,2,3,5,8])
 ary = ary + 1
 print (ary[1])

Correct Answer : Option (D) :   3

  Show Answer

Correct Answer : Option (A) :   pip3 install numpy

  Show Answer

Correct Answer : Option (A) :   true

  Show Answer

Correct Answer : Option (D) :   All of the above

  Show Answer

Correct Answer : Option (B) :   np.load(filename.npy)

  Show Answer

Correct Answer : Option (C) :   counts the number of elements

  Show Answer

Correct Answer : Option (C) :   reshape(array, shape)

  Show Answer
9 .
What will be output for the following code?
 
 import numpy as np
 a = np.array([[1,2,3],[0,1,4]]) 
 b = np.zeros((2,3), dtype=np.int16)
 c = np.ones((2,3), dtype=np.int16)
 d = a + b + c
 print (d[1,2] )

Correct Answer : Option (A) :   5

  Show Answer

Correct Answer : Option (D) :   finds the minimum number in numpy array

  Show Answer