Class 12 Python Revision Tour 2 Quiz

Preview



Python revision Tour 2 Quiz

Please fill your name and Email Address

1 / 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,] ?

2 / 25

What data type is the object below ?

L = ( 1, 23, ‘ hello ‘ , 10 )

3 / 25

All elements in a list must be of the same type .

4 / 25

Which line of code produces an error ?

5 / 25

There is no conceptual limit to the size of a list

6 / 25

The numbered position of a letter in a string is called  __________

7 / 25

You have the following code segment:

String1 = “my”String2 = “work”print ( String1 + string2 )

What is the output of this code ?

8 / 25

The max ( ) and min ( ) when used with tuples, can work if elements of the tuple are all of the same type.

9 / 25

A given object may appear in a list more than once .

10 / 25

You have the following code segment :

String1 = “my” String2 = “work”print ( String1 + string2.upper() )

What is the output of this code ?

11 / 25

The clear ( ) removes all the elements of a dictionary but does not delete the empty dictionary .

12 / 25

Which is the correct form of declaration of dictionary ?

13 / 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

14 / 25

A dictionary can contain keys of any valid Python types.

15 / 25

Identify the valid declaration of L :

L = [ 1, 23, ‘hi’, 6 ]

16 / 25

The keys of a dictionary must be of _______ types.

17 / 25

For any index n, str[:n] will give you original string str .

18 / 25

You can combine a numeric value and a string by using the + symbol .

19 / 25

Which two lines of code are valid strings in Python ?

20 / 25

A list of characters is similar to a string type .

21 / 25

A list may contain any type of objects except another list .

22 / 25

What is the value of the following expression ?

             3+3.  , 3**3.  

 

23 / 25

Do both the following represent the same list” .

[ ‘a’, ‘b’ , ‘c’ ]

[‘c’ , ‘a’ , ‘b’ ]

24 / 25

What is the output of this code

 int( “3” + “4” )

25 / 25

The keys of a dictionary must be of immutable types .

Your score is

The average score is 73%

0%



 

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