Practice Useful NumPy Functions - 3.5 | Chapter 3: Understanding NumPy for Machine Learning | Machine Learning Basics
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Academics
Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Professional Courses
Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβ€”perfect for learners of all ages.

games

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What does the function np.zeros(3) return?

πŸ’‘ Hint: What does 'zeros' imply?

Question 2

Easy

What is the output of np.ones(5)?

πŸ’‘ Hint: Think about what 'ones' means.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What function creates an array filled with ones?

  • np.zeros()
  • np.ones()
  • np.array()

πŸ’‘ Hint: Think of what the name suggests.

Question 2

True or False: np.mean() computes the median of the elements in an array.

  • True
  • False

πŸ’‘ Hint: What is the difference between mean and median?

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Create a 2D array of shape (4, 2) filled with random numbers and calculate the mean and standard deviation of all the elements.

πŸ’‘ Hint: What functions allow the generation of random values?

Question 2

Consider an array with the values from 0 to 10 excluding 5. How would you construct this using NumPy and compute its standard deviation?

πŸ’‘ Hint: How do you filter out specific values from an array?

Challenge and get performance evaluation