Python Modules and Packages

Python Modules and Packages

University

10 Qs

quiz-placeholder

Similar activities

Node.js

Node.js

University

10 Qs

WAN Sesi 1

WAN Sesi 1

1st Grade - University

10 Qs

Software Testing

Software Testing

University

10 Qs

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

Fun with Computer Architecture

Fun with Computer Architecture

University

15 Qs

C++ Array Quiz

C++ Array Quiz

University

10 Qs

Information System and Modern Organization part 1

Information System and Modern Organization part 1

University

14 Qs

Computer Basics 2 - CESA

Computer Basics 2 - CESA

7th Grade - University

10 Qs

Python Modules and Packages

Python Modules and Packages

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Lavakumar Gopu

Used 101+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

To put definitions in a file and use them in another scripts, we use_____

packages

functions

modules

project

2.

MULTIPLE CHOICE QUESTION

20 sec • 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

Provides a means of testing individual parts of the program

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following Python code?

from math import factorial

print(math.factorial(5))

120

Nothing is printed

Error, method factorial doesn’t exist in math module

Error, the statement should be: print(factorial(5))

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is false about “from-import” form of import?

The syntax is: from modulename import identifier

This form of import prevents name clash

The namespace of imported module becomes part of importing module

None of the Above

5.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

A module consists of

functions

variables

packages

classes

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is true regarding a package

it is a python file

it is an executable file

it is a directory

ALL

7.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following are contained by packages

modules

files

__init__.py

packages

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?