Class 12 Python Libraries and Modules MCQ Quiz | Python Libraries and Modules Quiz

Preview

Class 12 Python Libraries and Modules MCQ Quiz | Python Libraries and Modules Quiz



0%

Class 12 Python Libraries and Modules Quiz

1 / 23

Which of the following random module functions generates an integer ?

2 / 23

A  Python module has ____ extension.

3 / 23

The import<module> statement imports everything in the current namespace of the Python program.

4 / 23

A Python program and a Python module have the same .py file extension.

5 / 23

Any folder having .py files is a Python package.

6 / 23

The output of following code is:

"$".join("HELLO")

7 / 23

What is the maximum values that can be assigned to FROM and TO in the following code.

import random
AR = [ 20 , 30 , 40 ,  50 , 60 , 70 ] ;
FROM = random.randint (1 , 3)
To =  random . randint(2 , 4)

 

8 / 23

The output of following code is:

>>>round(2.4574,2)

9 / 23

What could be the output of following code:

import random
import math
print(math.ceil(random.random())

10 / 23

What is the output of following code:

>>> "I love Python".split()

11 / 23

An independent triple quoted string given inside a module, containing documentation related information is a _____ .

12 / 23

The uniform ( ) function is the part of ____ module.

13 / 23

Which of the following random module functions generates a floating point number ?

14 / 23

What is docstring?

15 / 23

What possible outputs(s) of the following code ?

import random
AR = [ 20 , 30 , 40 ,  50 , 60 , 70 ] ;
FROM = random.randint (1 , 3)
To =  random . randint(2 , 4)
for  K in range ( FROM , TO):
     print (AR [K] , end = "#")

16 / 23

The statement from <module> import <object> is used to import a module in full.

17 / 23

A Python ____ is a file (.py file) containing variables, class definitions, statements and functions related to a particular task.

18 / 23

What is the output of following code:

>>>' I love Python'.replace('Python','Programming')

19 / 23

The capwords( ) function is the part of ____ module.

20 / 23

A folder having .py files along with a special file _init_.py in it is an importable Python package.

21 / 23

Which of the option are the expected output of following code.

import math
import random
print ( str ( int ( math . pow ( random . randint (2, 4) , 2 ))) , end = ' ' )
print ( str ( int ( math . pow ( random . randint (2, 4) , 2 ))) , end = ' ' )
print ( str ( int ( math . pow ( random . randint (2, 4) , ))))

22 / 23

A ___ refers to a collection of modules that together cater to specific type of needs or applications.

23 / 23

The help <module> statement display _____ from a module.



 

Spread the love
Lesson tags: Class 12 Python Libraries and Modules MCQ, Python Libraries and Modules, Python Libraries and Modules Quiz, python quiz for class 12
Back to: CBSE class 12 Computer Science notes
Spread the love