1. Home
  2. Data Science
  3. NumPy
  4. Which NumPy function creates a range of numbers?

Added 16 Sep 2025

Which NumPy function creates a range of numbers?

  1. np.range()
  2. np.arange() Correct answer
  3. np.sequence()
  4. np.linspace()

Correct answer

B. np.arange()

17 views

MCQSEXAM

Explanation

np.arange() creates arrays with regularly incrementing values within a given interval.

Reference

Asked in: Data Science Exams

https://numpy.org/doc/stable/reference/generated/numpy.arange.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs