Class 12 Python Libraries and Modules Quiz Preview Class 12 Python Libraries and Modules Quiz 1 / 29 " I love python". split() will give output ('I', 'love', 'python') I,love,python ['I', 'love', 'python'] 2 / 29 pow(3,4) gives output 81 64 9 3 / 29 A Python program and a Python module have the same .py file extension. False True 4 / 29 Which of the following random module functions generates a floating point number ? uniform ( ) All of these randint ( ) random( ) 5 / 29 max([3, 5, 9, 10], [7])will give output 7 10 [7] 6 / 29 int ('12') willgiven output 10 '12' 15' 12 7 / 29 min( [3, 5, 9], [7] )will give output [3, 5, 9] 3 [3, 2, 9] 8 / 29 import random print(str(random.randint(2,4)), end= ' ') print(str(random.randint(2,4)), end= ' ')will give output 1 2 2 3 2 6 2 5 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 Module documentation classes library 10 / 29 A Python module has___ extension. py mpy mod imp 11 / 29 "I Love python". split ("o")will give output ['I L', 've pyth', 'n'] [ il,ve,pyth,n ] [ "il","ve",pyth","n"] 12 / 29 >>> "**".join( ["Hello","World"] )will give output 'Hello*World' 'Hello**World' 'Hello World' 13 / 29 range(3) will give sequence output 0,1,1 0,1,2 1,0,3 14 / 29 max( (3 ,5, 9, 10), (7,)) will give output 10 5 7 15 / 29 import math import random print(math.ceil(random.random())) 0 1.0 1.1 16 / 29 "*".join("Hello") will give output '*hello*' "hello" 'H*e*l*l*0' 17 / 29 max(3, 5)will give output 5 2 3 18 / 29 The statement from <module> import <object> is used to import a module in full . False True 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 40#50#60# 30#40#50# 30#40#50#60# 20 / 29 The uniform() function is part of ____________ module. random statistics math 21 / 29 abs(-12.4)will give output (11.5) (12.1) (12.4) 22 / 29 Which of the following random module functions generates an integer? all of these uniform( ) randint( ) random( ) 23 / 29 A Python program and a Python module means the same False True 24 / 29 divmod(7, 2) will give output (3,2) (2,1) (3,1) 25 / 29 >>> type(25) will give output Integer 'int' 26 / 29 float ('12.2') willgive output 12.1 12.5 12.2 27 / 29 An independent triple quoted string given inside a module, containing documentation related information is a _______ . library documentation classes Documentation string 28 / 29 len("abc") gives output 4 3 2 29 / 29 "#".join( ("Hello","Python" ,"world") ) will give output 'Hello##Python##world' 'Hello Python world' 'Hello#Python#world' Your score is Facebook Twitter VKontakte 0% Restart quiz Exit Lesson tags: python quiz for class 12 Class 12 Working with Functions Quiz Class 12 File Handling MCQ Quiz Back to: CBSE class 12 Computer Science notes