Loops-downloads-functions

Loops-downloads-functions

University

12 Qs

quiz-placeholder

Similar activities

XI Assessemnt 2

XI Assessemnt 2

11th Grade - University

10 Qs

Python Basics

Python Basics

University

15 Qs

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

Python if statement

Python if statement

University

15 Qs

Python3

Python3

4th Grade - University

10 Qs

Python Lists and Tuples

Python Lists and Tuples

University

11 Qs

Kuiz Dasar Python

Kuiz Dasar Python

University

10 Qs

Python quiz

Python quiz

University - Professional Development

10 Qs

Loops-downloads-functions

Loops-downloads-functions

Assessment

Quiz

Computers

University

Hard

Created by

peter verkinderen

Used 2+ times

FREE Resource

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?

print

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?