Numpy Multiple Choice Questions and Answers - NF AI
Numpy Multiple Choice Questions and Answers - NF AI
Answers
Bilal Muhammad (https://www.nfaicompany.com/author/mubquaidian/) - August 21, 2021 -
MCQs (https://www.nfaicompany.com/category/multiple-choice-questions/) -
1 Comment (https://www.nfaicompany.com/numpy-mcqs/?noamp=mobile#comments)
Anyone can sharpen their knowledge of Numpy Python library with Numpy multiple choice questions and answers.
MCQs Search
S E AR C H
Question 1:
b = np.array([0,3,4,2,1])
c = a + b Last name
c = c*a
print (c[2])
Email*
A. 7
Can we send you an email from time to
B. 12
time?
C. 10
S UBS C R I BE
D. 21
E. 28
-12%
Answer: D
Question 2:
import numpy as np
ary = np.array([1,2,3,5,8])
ary = ary + 1
print (ary[1])
Recent Posts
A. 0
Tips and Tricks for Training a Pretrained
B. 1 Machine Learning Model for Prediction
C. 2 (https://www.nfaicompany.com/tips-and-tricks-
D. 3 for-training-a-pretrained-machine-learning-
model-for-prediction/)
Tips and Tricks for Working with Encoders and
Answer: D Autoencoders in Machine Learning
(https://www.nfaicompany.com/tips-and-tricks-
Question 3: for-working-with-encoders-and-autoencoders-
in-machine-learning/)
Tips and Tricks for Working with Transformers:
A Powerful Library for NLP
(https://www.nfaicompany.com/tips-and-tricks-
What will be output for the following code? for-working-with-transformers-a-powerful-
library-for-nlp/)
Tips and Tricks for Working with scikit-learn, a
import numpy as np
ML Library in Python
a = np.array([[1,2,3],[0,1,4]]) (https://www.nfaicompany.com/tips-and-tricks-
print (a.size) for-working-with-scikit-learn-a-ml-library-in-
python/)
Tips and Tricks for Building Image Classifiers
A. 1
using Python
B. 5 (https://www.nfaicompany.com/tips-and-tricks-
C. 6 for-building-image-classifiers-using-python/)
D. 4
Answer: C
Achives
Question 4:
Archives
Select Month
What will be output for the following code?
import numpy as np
a = np.array([1,2,3,5,8])
print (a.ndim)
A. 0
B. 1
C. 2
D. 3
Answer: B
Question 5:
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] )
A. 5
B. 7
C. 3
D. 4
Answer: A
Question 6:
NumPY stands for?
A. Numbering Python
B. Number In Python
C. Numerical Python
D. None Of the above
Answer: C
Question 7:
A. Node.js
B. Matplotlib
C. SciPy
D. Both B and C
Answer: D
Question 8:
import numpy as np
dt = dt = np.dtype('i4')
print dt
A. int32
B. int64
C. int128
D. int16
Answer: A
Question 9:
A. ndarray
B. narray
C. nd_array
D. darray
Answer: A
Question 10:
Which of the following sets the size of the buffer
used in ufuncs?
A. bufsize(size)
B. setsize(size)
C. setbufsize(size)
D. size(size)
Answer: C
Question 11:
A. Zero
B. One
C. Negative one
D. Infinite
Answer: C
Question 12:
Answer: A
Question 13:
Each built-in data type has a character code that uniquely identifies it.What
is meaning of code "M"?
A. timedelta
B. datetime
C. objects
D. Unicode
Answer: B
Question 14:
reshape() function in numpy array using python is:
A. reshape(shape)
B. array.reshape(shape)
C. reshape(array, shape)
D. numpy.reshape(array)
Answer: C
Question 15:
A. array.list()
B. array.list
C. list.array()
D. list(array)
Answer: D
Question 16:
What is the correct code to install numpy in the linux system containing
python3?
Answer: B
Question 17:
What is the correct code to install numpy in the windows system containing
python3?
Answer: B
Question 18:
full() function requires 2 arguments minimum to pass in it.
A. true
B. false
C. none of above
D. full() doesn't belong to numpy
Answer: A
Question 19:
A. array
B. reshape
C. shape
D. Unicode
Answer: A
Question 20:
A. shape
B. date & time
C. objects
D. number of items
Answer: D
Question 21
Answer: C
Question 22
import numpy as np
x = np.array(list)
what is the output of x here?
Answer: A
Question 23:
Answer: A
Question 24:
fetch numpy as np
np.array(list)
Is it true to import numpy module like this?
A. Yes, true
B. Not, true
Answer: B
Question 25:
import numpy as np
np.array(list)
Is it true to import numpy module like this?
A. Yes, true
B. Not, true
C. Error, this question makes no sense
Answer: A
Question 26:
Choose the correct option to pass arguments to full() function in numpy.
A. only value
B. only shape
C. shape and value
D. none of the above
Answer: C
Question 27:
Answer: E
Question 28:
Answer: B
Question 29:
Answer: B
Question 30:
Is the following statement true?
numpy array can be converted to the list in python3?
A. Not at all
B. Yes, true
C. Yes, most of the time but not every time
D. Not true because numpy has nothing to do with lists
Answer: B
Question 31:
A. type(array)
B. dtype
C. objects.type(array)
D. numpy(type)
Answer: B
Question 32:
Answer: D
Question 33:
A. np.array()
B. np.zeros()
C. np.empty()
D. np.arange()
E. All of the above
Answer: E
Question 34
What are the attributes of numpy array?
Answer: A
Question 35:
Answer: D
Question 36:
A. np.load(filename.npy)
B. np.load()
C. np.save(filename.npy, array)
D. all of the above
Answer: A
Question 37:
Answer: B