Search Header Logo

LO13 Lesson 9_Modules

Authored by Samantha Cassia

Computers, Instructional Technology, Other

10th Grade

Used 2+ times

LO13 Lesson 9_Modules
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A Python module file can be imported into another Python file.

True

False

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A Python file cannot contain variables.

True

False

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A Python file cannot contain runnable code.

True

False

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

You can create your own modules.

True

False

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not an advantage of using modules?

Provides a means of reuse of program code

Provides a means of dividing up tasks

Provides a means of reducing the size of the program

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A Python module is a file with the _____ file extension that contains valid Python code.

.pymodule
.py
.module
.pym

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose a function called add() is defined in a module called adder.py.

Which of the following code snippets correctly shows how to import and use the add() function?

import add from adder

result = add(2, 3)

from adder import add

result = add(2, 3)

from adder import add

result = adder.add(2, 3)

import add

result = adder.add(2, 3)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?