Blog

MCQs

Disclaimer:

Educational Use Only:

The website links provided are to be used strictly for educational and knowledge-gaining purposes only.

No Misuse:

Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.

Respect for Websites and Businesses:

Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.

Acknowledge Value of Knowledge:

Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.

No Endorsement:

The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.

User Responsibility:

By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.


Overall MCQs for Reference

  1. What is the primary purpose of NumPy in Python for AI applications?
    a. Web development
    b. Data visualization
    c. Numerical computations and array manipulation
    d. Game development
    Answer: c. Numerical computations and array manipulationpythonforall+1​
  2. Which of the following best explains why NumPy arrays are more efficient than Python lists for numerical computations?
    a. They are dynamically typed and flexible
    b. They use contiguous blocks of memory and vectorized operations
    c. They automatically parallelize all operations
    d. They allow heterogeneous data types in the same array
    Answer: b. They use contiguous blocks of memory and vectorized operationsstudocu+1​
  3. Which function is used to create a NumPy array from a Python list?
    a. np.create()
    b. np.array()
    c. np.list()
    d. np.fromlist()
    Answer: b. np.array()w3schools​
  4. What does np.zeros((3,3)) create?
    a. A 3×3 array filled with ones
    b. A 3×3 array filled with zeros
    c. A 3×3 identity matrix
    d. A 3×3 random matrix
    Answer: b. A 3×3 array filled with zeroswayground​
  5. Which NumPy function is used to compute the dot product of two arrays?
    a. np.multiply()
    b. np.dot()
    c. np.matmul()
    d. np.linalg.dot()
    Answer: b. np.dot()geeksforgeeks​
  6. What does np.eye(3) return?
    a. A 3×3 array filled with ones
    b. A 3×3 identity matrix
    c. A 3×3 array filled with zeros
    d. A 3×3 random matrix
    Answer: b. A 3×3 identity matrixgeeksforgeeks​
  7. Which function is used to find the dimension of a NumPy array?
    a. np.ndim()
    b. np.shape()
    c. np.size()
    d. np.len()
    Answer: a. np.ndim()includehelp​
  8. What is the output of np.array().itemsize?w3schools+4​
    a. 4
    b. 8
    c. 16
    d. 32
    Answer: b. 8includehelp​
  9. Which function is used to generate random integers in NumPy?
    a. np.random.rand()
    b. np.random.randint()
    c. np.random.uniform()
    d. np.random.normal()
    Answer: b. np.random.randint()includehelp​
  10. What does np.linspace(0, 10, 5) return?
    a.olibr+4​
    b. [0, 2.5, 5, 7.5, 10]
    c.numpy+9​
    d.pythongeeks+2​
    Answer: b. [0, 2.5, 5, 7.5, 10]sanfoundry​
  11. Which function is used to reshape a NumPy array?
    a. np.reshape()
    b. np.resize()
    c. np.change()
    d. np.modify()
    Answer: a. np.reshape()kaggle​
  12. What does np.transpose() do?
    a. Flips the array horizontally
    b. Flips the array vertically
    c. Transposes the array (rows become columns)
    d. Reverses the array
    Answer: c. Transposes the array (rows become columns)includehelp​
  13. Which function is used to compute the mean of a NumPy array?
    a. np.average()
    b. np.mean()
    c. np.median()
    d. np.sum()
    Answer: b. np.mean()programiz​
  14. What does np.sum(arr, axis=0) do?
    a. Sums all elements in the array
    b. Sums along the rows
    c. Sums along the columns
    d. Sums along the diagonal
    Answer: c. Sums along the columnsprogramiz​
  15. Which function is used to find the maximum value in a NumPy array?
    a. np.max()
    b. np.maximum()
    c. np.high()
    d. np.top()
    Answer: a. np.max()programiz​
  16. What does np.vstack() do?
    a. Concatenates arrays vertically
    b. Concatenates arrays horizontally
    c. Stacks arrays depth-wise
    d. Splits arrays vertically
    Answer: a. Concatenates arrays verticallygeeksforgeeks​
  17. Which function is used to compute the standard deviation of a NumPy array?
    a. np.std()
    b. np.var()
    c. np.dev()
    d. np.sigma()
    Answer: a. np.std()programiz​
  18. What does np.hstack() do?
    a. Concatenates arrays vertically
    b. Concatenates arrays horizontally
    c. Stacks arrays depth-wise
    d. Splits arrays horizontally
    Answer: b. Concatenates arrays horizontallygeeksforgeeks​
  19. Which function is used to compute the median of a NumPy array?
    a. np.median()
    b. np.middle()
    c. np.avg()
    d. np.center()
    Answer: a. np.median()programiz​
  20. What does np.concatenate() do?
    a. Joins arrays along a specified axis
    b. Splits arrays into sub-arrays
    c. Reverses the array
    d. Flips the array
    Answer: a. Joins arrays along a specified axisgeeksforgeeks​
  21. Which function is used to compute the determinant of a matrix in NumPy?
    a. np.linalg.det()
    b. np.linalg.inv()
    c. np.linalg.norm()
    d. np.linalg.eig()
    Answer: a. np.linalg.det()geeksforgeeks​
  22. What does np.linalg.inv() do?
    a. Computes the inverse of a matrix
    b. Computes the determinant of a matrix
    c. Computes the norm of a matrix
    d. Computes the eigenvalues of a matrix
    Answer: a. Computes the inverse of a matrixgeeksforgeeks​
  23. Which function is used to compute the eigenvalues of a matrix in NumPy?
    a. np.linalg.eigvals()
    b. np.linalg.eig()
    c. np.linalg.det()
    d. np.linalg.inv()
    Answer: b. np.linalg.eig()geeksforgeeks​
  24. What does np.linalg.norm() do?
    a. Computes the norm of a matrix or vector
    b. Computes the inverse of a matrix
    c. Computes the determinant of a matrix
    d. Computes the eigenvalues of a matrix
    Answer: a. Computes the norm of a matrix or vectorgeeksforgeeks​
  25. Which function is used to solve a system of linear equations in NumPy?
    a. np.linalg.solve()
    b. np.linalg.inv()
    c. np.linalg.det()
    d. np.linalg.eig()
    Answer: a. np.linalg.solve()geeksforgeeks​
  26. What does np.linalg.qr() compute?
    a. Determinant
    b. QR decomposition
    c. Singular Value Decomposition
    d. Cross product
    Answer: b. QR decompositiongeeksforgeeks​
  27. Which function is used to compute the Singular Value Decomposition of a matrix?
    a. np.linalg.svd()
    b. np.linalg.qr()
    c. np.linalg.inv()
    d. np.linalg.det()
    Answer: a. np.linalg.svd()geeksforgeeks​
  28. What does np.linalg.lstsq() do?
    a. Computes the least-squares solution to a linear matrix equation
    b. Computes the inverse of a matrix
    c. Computes the determinant of a matrix
    d. Computes the eigenvalues of a matrix
    Answer: a. Computes the least-squares solution to a linear matrix equationgeeksforgeeks​
  29. Which function is used to compute the cross product of two vectors in NumPy?
    a. np.cross()
    b. np.dot()
    c. np.multiply()
    d. np.outer()
    Answer: a. np.cross()geeksforgeeks​
  30. What does np.outer() do?
    a. Computes the outer product of two vectors
    b. Computes the dot product of two vectors
    c. Computes the cross product of two vectors
    d. Computes the element-wise product of two vectors
    Answer: a. Computes the outer product of two vectorsgeeksforgeeks​
  31. Which function is used to compute the element-wise square root of a NumPy array?
    a. np.sqrt()
    b. np.root()
    c. np.power()
    d. np.exp()
    Answer: a. np.sqrt()geeksforgeeks​
  32. What does np.power(arr, 2) do?
    a. Computes the square root of each element
    b. Computes the square of each element
    c. Computes the exponential of each element
    d. Computes the logarithm of each element
    Answer: b. Computes the square of each elementprogramiz​
  33. Which function is used to compute the exponential of each element in a NumPy array?
    a. np.exp()
    b. np.log()
    c. np.sqrt()
    d. np.power()
    Answer: a. np.exp()programiz​
  34. What does np.log(arr) do?
    a. Computes the exponential of each element
    b. Computes the logarithm of each element
    c. Computes the square root of each element
    d. Computes the square of each element
    Answer: b. Computes the logarithm of each elementprogramiz​
  35. Which function is used to compute the sine of each element in a NumPy array?
    a. np.sin()
    b. np.cos()
    c. np.tan()
    d. np.atan()
    Answer: a. np.sin()geeksforgeeks​
  36. What does np.cos(arr) do?
    a. Computes the sine of each element
    b. Computes the cosine of each element
    c. Computes the tangent of each element
    d. Computes the arctangent of each element
    Answer: b. Computes the cosine of each elementgeeksforgeeks​
  37. Which function is used to compute the tangent of each element in a NumPy array?
    a. np.tan()
    b. np.sin()
    c. np.cos()
    d. np.atan()
    Answer: a. np.tan()geeksforgeeks​
  38. What does np.arctan(arr) do?
    a. Computes the sine of each element
    b. Computes the cosine of each element
    c. Computes the tangent of each element
    d. Computes the arctangent of each element
    Answer: d. Computes the arctangent of each elementgeeksforgeeks​
  39. Which function is used to compute the absolute value of each element in a NumPy array?
    a. np.abs()
    b. np.absolute()
    c. np.positive()
    d. np.negate()
    Answer: a. np.abs()geeksforgeeks​
  40. What does np.ceil(arr) do?
    a. Rounds each element up to the nearest integer
    b. Rounds each element down to the nearest integer
    c. Rounds each element to the nearest integer
    d. Computes the square root of each element
    Answer: a. Rounds each element up to the nearest integergeeksforgeeks​
  41. Which function is used to round each element down to the nearest integer in a NumPy array?
    a. np.floor()
    b. np.ceil()
    c. np.round()
    d. np.trunc()
    Answer: a. np.floor()geeksforgeeks​
  42. What does np.round(arr) do?
    a. Rounds each element to the nearest integer
    b. Rounds each element up to the nearest integer
    c. Rounds each element down to the nearest integer
    d. Computes the square root of each element
    Answer: a. Rounds each element to the nearest integergeeksforgeeks​
  43. Which function is used to truncate each element in a NumPy array?
    a. np.trunc()
    b. np.floor()
    c. np.ceil()
    d. np.round()
    Answer: a. np.trunc()geeksforgeeks​
  44. What does np.isnan(arr) do?
    a. Returns True for NaN values
    b. Returns True for infinite values
    c. Returns True for finite values
    d. Returns True for complex values
    Answer: a. Returns True for NaN valuesgeeksforgeeks​
  45. Which function is used to check if elements are infinite in a NumPy array?
    a. np.isinf()
    b. np.isnan()
    c. np.isfinite()
    d. np.iscomplex()
    Answer: a. np.isinf()geeksforgeeks​
  46. What does np.isfinite(arr) do?
    a. Returns True for finite values
    b. Returns True for infinite values
    c. Returns True for NaN values
    d. Returns True for complex values
    Answer: a. Returns True for finite valuesgeeksforgeeks​
  47. Which function is used to check if elements are complex in a NumPy array?
    a. np.iscomplex()
    b. np.isreal()
    c. np.isfinite()
    d. np.isinf()
    Answer: a. np.iscomplex()freetimelearning​
  48. What does np.all(arr) do?
    a. Returns True if all elements are True
    b. Returns True if any element is True
    c. Returns the sum of all elements
    d. Returns the product of all elements
    Answer: a. Returns True if all elements are Truegeeksforgeeks​
  1. https://www.pythonforall.com/modules/numpy/numpyapplications
  2. https://www.w3schools.com/python/numpy/numpy_intro.asp
  3. https://www.studocu.com/in/document/thapar-institute-of-engineering-and-technology/masters-of-computer-application/mcq-quiz-numpy-pandas-questions-for-ai-course/138127034
  4. https://www.includehelp.com/python/numpy-mcqs.aspx
  5. https://www.scribd.com/document/724165142/Numpy-Multiple-Choice-Questions-And-Answers-NF-AI
  6. https://pythongeeks.org/quizzes/quiz-on-numpy/
  7. https://www.geeksforgeeks.org/interview-experiences/numpy-quiz/
  8. https://www.w3schools.com/python/numpy/numpy_creating_arrays.asp
  9. https://wayground.com/admin/quiz/6061f70749d804001b30fe18/python-numpy-quiz
  10. https://www.geeksforgeeks.org/quizzes/linear-algebra-in-numpy-arrays/
  11. https://www.geeksforgeeks.org/numpy/python-numpy/
  12. https://numpy.org
  13. https://olibr.com/blog/what-is-numpy-what-are-its-features-and-applications/
  14. https://www.programiz.com/python-programming/numpy/array-functions
  15. https://mlbookcamp.com/article/numpy
  16. https://towardsdatascience.com/10-numpy-functions-you-should-know-1dc4863764c5/
  17. https://www.sanfoundry.com/data-science-questions-answers-campus-interviews/
  18. https://www.kaggle.com/code/abhayparashar31/best-numpy-functions-for-data-science-50
  19. https://www.geeksforgeeks.org/quizzes/python-numpy-quiz/
  20. https://www.freetimelearning.com/online-quiz/numpy-quiz
  21. https://data-flair.training/blogs/numpy-applications/
  22. https://madewithml.com/courses/foundations/numpy/
  23. https://test.yuvayana.org/computer-science/numpy-basic-mcq-quiz-for-beginners/
  24. https://www.datacamp.com/cheat-sheet/numpy-cheat-sheet-data-analysis-in-python
  25. https://www.w3schools.com/python/numpy/numpy_quiz.asp
  26. https://studyopedia.com/numpy/numpy-online-quiz/
  27. https://www.tutorialaicsip.com/machine-learning/advanced-numpy-operations/
  28. https://www.scribd.com/document/918015498/Mcq
  29. https://github.com/greyhatguy007/Mathematics-for-Machine-Learning-and-Data-Science-Specialization-Coursera
  30. https://www.datacamp.com/blog/numpy-interview-questions
  31. https://www.machinelearningplus.com/python/101-numpy-exercises-python/

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!