Students find these Class 9 AI MCQ Chapter 9 Lists in Python Class 9 AI MCQ Online Test with Answers helpful for self-assessment and preparation.
Class 9 AI Lists in Python MCQ
MCQ on Lists in Python Class 9
Class 9 Lists in Python MCQ – Lists in Python MCQ Class 9
Multiple Choice Questions
Question 1.
Which value is used to represent the first index of list?
(a) 1
(b) 0
(c) -1
(d) a
Answer:
(b) 0
Question 2.
Choose the output of following Python code.
l1-list ()
print (l1)
(a) [ ]
(b) ( )
(c) [,]
(d) Empty
Answer:
(a) [ ]

Question 3.
Suppose list
l1-[10,20,30,40,50,60,70]
print(l1[-3])
(a) 30
(b) 50
(c) 40
(d) Error
Answer:
(b) 50
Question 4.
Choose the output from following code.

(a) T
(b) N
(c) A
(d) Error
Answer:
(d) Error
Question 5.
Which function is used to insert an element at specified position in the list?
(a) extend ()
(b) append ()
(c) insert ()
(d) add 0
Answer:
(c) insert ()
Statement Based Questions
Question 1.
Statement 1 A list in Python can contain elements of different data types.
Statement 2 Lists in Python are immutable.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(c) Statement 1 is correct but Statement 2 is incorrect
Question 2.
Statement 1 The index of the first element in a Python list is 1.
Statement 2 You can use negative indices to access elements from the end of a list in Python.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(d) Statement 2 is correct but Statement 1 is incorrect

Question 3.
Statement 1 The append() method adds an element to the end of a list in Python.
Statement 2 The remove() method deletes an element from a list by its index.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct buit Statement 1 is incorrect
Answer:
(c) Statement 1 is correct but Statement 2 is incorrect
Question 4.
Statement 1 Lists in Python can be nested, meaning a list can contain other lists.
Statement 2 The len() function returns the number of elements in a list, including any nested lists as a single element.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(a) Both Statement 1 and Statement 2 are correct
Question 5.
Statement 1 The slice operation in lists uses the syntax list[start:end] and includes the element at the end index.
Statement 2 You can concatenate two lists in Python using the + operator.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(d) Statement 2 is correct but Statement 1 is incorrect
Assertion & Reason Based Questions
Question 1.
Assertion (A) A list in Python can contain elements of different data types.
Reason (R) Lists in Python are mutable.
(a) Both A and R are true, and R is the correct ‘explanation of A.
(b) Both A and R are true, but R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.
Answer:
(b) Both A and R are true, but R is not the correct explanation of A.

Question 2.
Assertion (A) You can add a new element to the end of a list using the append() method in Python.
Reason (R) The append() method modifies the list in place.
(a) Both A and R are true, and R is the correct explanation of A .
(b) Both A and R are true, but R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.
Answer:
(a) Both A and R are true, and R is the correct explanation of A .
Question 3.
Assertion (A) The len() function returns the total number of elements in a list.
Reason (R) The len() function only works with lists that contain numeric data types.
(a) Both A and R are true, and R is the correct explanation of A.
(b) Both A and R are true, but R is not the correct explanation of A .
(c) A is true, but R is false.
(d) A is false, but R is true.
Answer:
(c) A is true, but R is false.

Question 4.
Assertion (A) Lists in Python can be concatenated using the + operator.
Reason (R) The + operator creates a new list that combines the elements of the original lists.
(a) Both A and R are true, and R is the correct explanation of A.
(b) Both A and R are true, but R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.
Answer:
(a) Both A and R are true, and R is the correct explanation of A.
The post Lists in Python Class 9 AI MCQ Online Test appeared first on Learn CBSE.