
Loops-downloads-functions
Authored by peter verkinderen
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a Python library?
A named block of Python code that is reusable
A collection of functions that expands the capabilities of Python
A function that reads/writes files
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What are examples of Python libraries?
regex
requests
open
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which program do you use to download and install a new Python library?
import
pip install
pip3 install
git pull
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what are examples of a correct for loop in Python?
for x in [1,2,3]
print(x)
for item in [1,2,3]:
print(x)
for item in [1,2,3]:
print(item)
for x of [1,2,3]:
print(x)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
dates = [1210, 1520, 1340]
for date in dates:
print(dates)
[1210, 1520, 1340]
[1210, 1520, 1340]
[1210, 1520, 1340]
[1210, 1520, 1340]
1210
1520
1340
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which regex will match only the URL?
<a href="https://example.com">example</a>
"href=".+""
"href="(.+)""
'href="(.+)"'
'href="([^"]+)"'
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which Python library is used for regular expressions?
requests
re
regex
RE
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?