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

Click here to learn basics of  Python

1 / 23

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

2 / 23

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

3 / 23

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

4 / 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)

 

5 / 23

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

6 / 23

What is the output of following code:

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

7 / 23

Which of the following random module functions generates an integer ?

8 / 23

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

9 / 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) , ))))

10 / 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 = "#")

11 / 23

The output of following code is:

>>>round(2.4574,2)

12 / 23

A  Python module has ____ extension.

13 / 23

What is the output of following code:

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

14 / 23

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

15 / 23

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

16 / 23

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

17 / 23

The output of following code is:

"$".join("HELLO")

18 / 23

Any folder having .py files is a Python package.

19 / 23

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

20 / 23

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

21 / 23

What could be the output of following code:

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

22 / 23

What is docstring?

23 / 23

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



 

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