Complete the code to import the NumPy library with the common alias.
import [1] as np
The standard way to import NumPy is using import numpy as np. This allows us to use np as a short name for NumPy functions.
Complete the command to install NumPy using pip in the terminal.
pip [1] numpyTo install a Python package like NumPy, we use pip install numpy in the terminal or command prompt.
Fix the error in the import statement to correctly import NumPy.
import [1]
The correct module name is numpy all lowercase. Using other spellings or abbreviations causes an error.
Fill both blanks to create a NumPy array from a Python list.
import numpy as np arr = np.[1]([2])
To create a NumPy array, use np.array() and pass a Python list like [1, 2, 3] inside the parentheses.
Fill all three blanks to import NumPy, create an array, and print it.
import [1] as np arr = np.[2]([3]) print(arr)
This code imports NumPy as np, creates an array from the list [10, 20, 30], and prints the array.