AMP

Chapter 6 Introduction to NumPy — Online MCQ Test

INFORMATICS PRACTICES · Grade 11 · CBSE(NCERT)
Practice Chapter 6 Introduction to NumPy with a free chapter-wise online MCQ test. This chapter covers: Introduces the NumPy library for scientific and numerical computing. Covers NumPy arrays array creation indexing slicing vectorized operations mathematical functions array manipula.... AI-generated questions from basic to board-exam level, with instant results and explanations.

Start Exam on Full Site →

Chapter 6 Introduction to NumPy — Important Questions & Answers

What does NumPy primarily provide in Python?
  • A. Tools for web development
  • B. Support for numerical and scientific computing
  • C. Functions for creating GUI applications
  • D. Commands for database management
Answer: B. Support for numerical and scientific computing
NumPy is a library used for numerical computation and efficient handling of large arrays and matrices.
What is the full form of NumPy?
  • A. Numerical Python
  • B. Numeric Program
  • C. Number Processing in Python
  • D. New Python Module
Answer: A. Numerical Python
NumPy stands for Numerical Python.
What is the result of `np.array([1, 2, 3]) + 2`?
  • A. [3, 4, 5]
  • B. [2, 4, 6]
  • C. [1, 2, 3, 2]
  • D. Error
Answer: A. [3, 4, 5]
NumPy performs vectorized addition, adding 2 to every element of the array.
Which mathematical function returns the square root of each element in a NumPy array?
  • A. np.sqrt()
  • B. np.power()
  • C. np.abs()
  • D. np.sum()
Answer: A. np.sqrt()
`np.sqrt()` computes the square root element-wise for each value in the array.
Which of the following is the best use of `np.sum()` in NumPy?
  • A. To find the product of elements
  • B. To count the dimensions of an array
  • C. To add all elements of an array
  • D. To reshape an array
Answer: C. To add all elements of an array
`np.sum()` returns the total of all elements in the array, or along a specified axis.