Python Modules and Packages

Python Modules and Packages

University

10 Qs

quiz-placeholder

Similar activities

CHP1: INTRODUCTION TO CAO

CHP1: INTRODUCTION TO CAO

University

10 Qs

DFP40203 PYTHON PROGRAMMING-FUNCTION

DFP40203 PYTHON PROGRAMMING-FUNCTION

University

10 Qs

workshop FSTM

workshop FSTM

University

13 Qs

Advanced Java Lab_4CSN

Advanced Java Lab_4CSN

University

10 Qs

DS_NumPy_TEST1

DS_NumPy_TEST1

University

12 Qs

Test Kompjupiterkowy

Test Kompjupiterkowy

KG - Professional Development

9 Qs

Anadatos 2

Anadatos 2

University

11 Qs

PYTHON UNIT I MCQS

PYTHON UNIT I MCQS

University

15 Qs

Python Modules and Packages

Python Modules and Packages

Assessment

Quiz

Computers

University

Hard

Created by

Lavakumar Gopu

Used 95+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?