Class 12 Python Libraries and Modules Quiz

Preview



Class 12 Python Libraries and Modules Quiz

1 / 29

" I love python". split()

will give output

2 / 29

pow(3,4)

gives output

3 / 29

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

4 / 29

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

5 / 29

max([3, 5, 9, 10], [7])

will give output

6 / 29

int ('12') will

given output

7 / 29

min( [3, 5, 9], [7] )

will give output

8 / 29

import random
print(str(random.randint(2,4)), end= ' ')
print(str(random.randint(2,4)), end= ' ')
will give output

9 / 29

A .py file containing constants/variables, classes, functions, etc. related to a particular task and can be used in other programs is called

10 / 29

A Python module has___  extension.

11 / 29

"I Love python". split ("o")

will give output

12 / 29

>>> "**".join( ["Hello","World"] )

will give output

13 / 29

range(3) will

give sequence output

14 / 29

max( (3 ,5, 9, 10), (7,))

will give output

15 / 29

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

16 / 29

"*".join("Hello")

will give output

17 / 29

max(3, 5)

will give output

18 / 29

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

19 / 29

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

20 / 29

The uniform() function is part of ____________ module.

21 / 29

abs(-12.4)

will give output

22 / 29

Which of the following random module functions generates an integer?

23 / 29

A Python program and a Python module means the same

24 / 29

divmod(7, 2)

will give output

25 / 29

>>> type(25)
will give output

26 / 29

float ('12.2') will

give output

27 / 29

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

28 / 29

len("abc")

gives output

29 / 29

"#".join( ("Hello","Python" ,"world") )

will give output

Your score is

0%

Exit



 

Lesson tags: python quiz for class 12
Back to: CBSE class 12 Computer Science notes