Recall & Review
beginner
What is NumPy used for in data science?
NumPy is a library that helps us work with numbers and arrays easily. It makes math with big lists of numbers faster and simpler.
Click to reveal answer
beginner
How do you install NumPy using pip?
You open your command line or terminal and type
pip install numpy. This downloads and sets up NumPy on your computer.Click to reveal answer
beginner
What is the Python code to import NumPy with the common alias?You write <code>import numpy as np</code>. This lets you use <code>np</code> to call NumPy functions easily.Click to reveal answer
beginner
Why do we use an alias like
np when importing NumPy?Using
np saves time and makes your code shorter and easier to read when you use NumPy functions.Click to reveal answer
beginner
What should you do if you get an error saying NumPy is not found when importing?
It means NumPy is not installed. You should run
pip install numpy in your terminal to install it.Click to reveal answer
Which command installs NumPy?
✗ Incorrect
The correct command to install NumPy is
pip install numpy.How do you import NumPy with the common short name?
✗ Incorrect
The standard way is
import numpy as np to use np as a shortcut.What does NumPy mainly help with?
✗ Incorrect
NumPy is designed to work with arrays and numerical data efficiently.
If you get an error 'ModuleNotFoundError: No module named numpy', what should you do?
✗ Incorrect
This error means NumPy is not installed, so you need to install it using
pip install numpy.Why do we use the alias 'np' when importing NumPy?
✗ Incorrect
Using 'np' makes the code shorter and easier to read.
Explain how to install and import NumPy in a Python project.
Think about the steps from setting up to using NumPy in code.
You got /4 concepts.
What should you do if Python says NumPy is not found when you try to import it?
Focus on fixing missing package errors.
You got /4 concepts.