Class 12 Python Revision Tour 2 Quiz Preview Python revision Tour 2 Quiz Please fill your name and Email Address 1 / 25 A list may contain any type of objects except another list . True False 2 / 25 The max ( ) and min ( ) when used with tuples, can work if elements of the tuple are all of the same type. False True 3 / 25 A list of characters is similar to a string type . True False 4 / 25 Which two lines of code are valid strings in Python ? “This is a string” ‘This is a string’ This is a string (This is a string) 5 / 25 What is the value of the following expression ? 3+3. , 3**3. [ 6.0, 27.0 ] (6,27) ( 6.0, 27.0 ) (6.0 , 9.00 ) 6 / 25 You have the following code segment:String1 = “my”String2 = “work”print ( String1 + string2 )What is the output of this code ? my my work work mywork 7 / 25 There is no conceptual limit to the size of a list True False 8 / 25 You have the following code segment :String1 = “my” String2 = “work”print ( String1 + string2.upper() )What is the output of this code ? myWORK mywork MY Work My Work 9 / 25 Which line of code will cause an error ?1. num = [ 5 , 4 , 3 , [ 2 ] , 1 ]2. print (num[0])3. print (num[3])4. print Line 3 Line 3 Line 1 Line 4 10 / 25 You can combine a numeric value and a string by using the + symbol . False True 11 / 25 The numbered position of a letter in a string is called __________ location integer position index Positon 12 / 25 All elements in a list must be of the same type . False True 13 / 25 Which is the correct form of declaration of dictionary ? (b) Day = { 1; ‘Monday’ , 2; ‘Tuesday’ 3 ; ‘Wednesday’} (a) Day = { 1: ‘Monday’ , 2: ‘Tuesday’,3 : ‘Wednesday’} (c) Day = [ 1: ‘Monday’ , 2: ‘Tuesday’,3 : ‘Wednesday’} (d) Day = { 1 ‘ monday’ , 2 ‘Tuesday’ , 3’wednesday’} 14 / 25 What is the output of this code int( “3” + “4” ) 24 “34” “7” 34 15 / 25 Which line of code produces an error ? “one” + “2” 1 + 2 ”one” + ‘two’ ‘1’ + 2 16 / 25 Identify the valid declaration of L :L = [ 1, 23, ‘hi’, 6 ] tuple array List dictionary 17 / 25 The keys of a dictionary must be of immutable types . False True 18 / 25 List AL is Defined as follows : AL = [ 1,2,3,4,5 ]Which of the following statements removes the middle element 3 from it so that the list AL equals [1,2,4,5,] ? AL. remove(3) AL[2:2] = [ ] AL[2] = [ ] del AL[2] 19 / 25 A given object may appear in a list more than once . True False 20 / 25 For any index n, str[:n] will give you original string str . False True 21 / 25 The keys of a dictionary must be of _______ types. Integer mutable immutable 22 / 25 What data type is the object below ?L = ( 1, 23, ‘ hello ‘ , 10 ) dictionary tuple List array 23 / 25 Do both the following represent the same list” .[ ‘a’, ‘b’ , ‘c’ ][‘c’ , ‘a’ , ‘b’ ] False True 24 / 25 The clear ( ) removes all the elements of a dictionary but does not delete the empty dictionary . False True 25 / 25 A dictionary can contain keys of any valid Python types. True False Your score is The average score is 73% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Lesson tags: python quiz for class 12 Class 12 Python Revision Tour 1 Quiz Class 12 Working with Functions Quiz Back to: CBSE class 12 Computer Science notes