Complete the code to import the math module.
import [1]
The import statement is used to bring in a module. Here, math is the module we want.
Complete the code to import only the sqrt function from the math module.
from math import [1]
The from ... import ... syntax imports a specific function or variable. Here, sqrt is the square root function.
Fix the error in the import statement to use an alias for the math module.
import math as [1]
Using as allows us to give a short name to the module. m is a common short alias for math.
Fill both blanks to import the randint function from random module with an alias.
from random import [1] as [2]
We import randint and give it the short name rand to use easily.
Fill all three blanks to import the choice and shuffle functions from random module with aliases.
from random import [1] as [2], [3] as shuffle
We import choice as pick and sample as shuffle. This shows how to rename multiple imports.