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 reqeusts | Apip install requests # check spelling first | |
| 2pip install requests | BAssuming a near match is good enough. Typosquatting relies on look-alike names, and a missing letter can mean a fake package. | |
| 3Typosquatting publishes a malicious package with a name almost the same as a trusted one, hoping people use it by mistake. | CThe correct, trusted package name, spelled exactly as published by its real maintainers. | |
| 4Checking a package name means comparing it letter by letter with the official name before you install it. | DA possible typosquatting mistake: the name has swapped letters, so it may install a fake package instead of the real requests library. | |
| 5pip install reqeusts # looks fine, run it | EInstalling without checking the spelling. The name is a typo of requests, so it could be a malicious typosquatting package. | |
| 6pip install requets # close enough | Freqeusts vs requests |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
typosquatting — Publishing a malicious package or site with a name almost the same as a trusted one, like reqeusts for requests, hoping people use it by mistake.pip install requestspip install requestspip show requestsname = "reqeusts"
if name != "requests":
print("Check the name!")trusted = "requests"
name = "reqeusts"
print(name == trusted)