Practice NumPy (Numerical Python) - 4.1 | Python for Data Science | Data Science Basic
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

NumPy (Numerical Python)

4.1 - NumPy (Numerical Python)

Enroll to start learning

You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

Create a 1D NumPy array containing numbers 1 to 5.

💡 Hint: Use `np.array` to create an array.

Question 2 Easy

What is the output of np.array([1, 2, 3]).mean()?

💡 Hint: Consider what the mean of {1, 2, 3} is.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What does the command np.array([5, 10, 15]) do?

Creates a list with values 5
10
and 15
Creates a NumPy array with values 5
10
and 15
Creates a dictionary with values 5
10
and 15

💡 Hint: Consider what the prefix 'np' indicates.

Question 2

True or False: An ndarray can contain elements of different data types.

True
False

💡 Hint: Think about the structure of data in NumPy.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Given two NumPy arrays, a = np.array([1, 2, 3]) and b = np.array([4, 5, 6]), write a function that returns their element-wise product.

💡 Hint: Think of how NumPy allows operations on arrays directly.

Challenge 2 Hard

Create a 2D NumPy array representing a dataset of 3 different plants with 4 features each, and compute the standard deviation of each feature.

💡 Hint: Take advantage of NumPy’s abilities to handle multidimensional data.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.