Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1pip install requests | Apip install requests import requests | |
| 2pip install requests==2.31.0 | Bpip show requests | |
| 3Install a third-party library first, then bring it into a program with import | CThe import comes before the install. The library must be installed with pip first, or import fails with ModuleNotFoundError. | |
| 4You can check which version of a library is installed | DInstalls version 2.31.0 of the requests library instead of the latest version | |
| 5import requests pip install requests | EDownloads the third-party requests library so a Python program can import it | |
| 6pip install requests=2.31.0 | FA version number needs two equals signs (==). A single = is not valid pip syntax. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
pip install requests — A terminal command that uses pip to download a third-party library (here requests) so a Python program can then import it. Add ==2.31.0 after the name to pick a version.pip install requestspip install requests
import requestspip install requests==2.31.0pip install requestspip install requests
import requests