wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PCAP Module 1 - Modules, Packages and PIP Review

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.
a)

entity c from module b from package a

b)

entity c from module a from package b

c)

entity b from module a from package c

2.

How do you us pip to remove an installed package?

a)

pip install --uninstall package

b)

pip --uninstall package

c)

pip remove package

d)

pip uninstall package

3.

The digraph written as #! is used to:

a)

graphing programming

b)

tell a Unix or Unix-like OS how to execute the contents of a Python file

c)

create a docstring

d)

make a module private

4.
a)

million of possible results

b)

11, 12, 21 or 22

c)

12

5.
a)

(fun)

b)

mod : : fun

c)
d)

mod:fun

6.
a)

reveal

b)

deposit

c)

pip

d)

show

7.

What is TRUE about updating already installed Python packages?

a)

it's performed by the install command accompanied by -U option

b)

It can be done only by uninstalling and installing the packages once

8.
a)

False

b)

True

c)

1

d)

0

9.

The pip list command presents a list of:

a)

available pip commands

b)

all packages available at PyPI

c)

Nothing

d)

locally installed packages

10.

The pyc file contains:

a)

compiled Python code

b)

a Python interpreter

c)

a Python source code

11.
a)

import fun from mod

b)

import fun

c)

from mod import fun

12.

During the first import of a module, Python deploys the pyx files in the directory called:

a)

__init__

b)

__pycache__

c)

mymodules

d)

hashband__

13.

When a module is imported, its contents:

a)

are executed once (implicitly)

b)

may be executed (explicitly)

c)

are ignored

d)

executed many times

14.

A function which returns a list of all entities available in a module is called:

a)

content ( )

b)

listmodule ( )

c)

entities ( )

d)

dir ( )