0% found this document useful (0 votes)
0 views2 pages

List WS

The document is a lesson plan for Computer Science class at Aster Public School, focusing on the topic of lists in Python. It includes multiple-choice questions and programming assignments related to list operations, properties, and functions in Python. The document aims to assess students' understanding of lists and their functionalities in Python programming.

Uploaded by

lorifi2547
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

List WS

The document is a lesson plan for Computer Science class at Aster Public School, focusing on the topic of lists in Python. It includes multiple-choice questions and programming assignments related to list operations, properties, and functions in Python. The document aims to assess students' understanding of lists and their functionalities in Python programming.

Uploaded by

lorifi2547
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ASTER PUBLIC SCHOOL, GREATER NOIDA

SESSION: 2024-2025
CLASS/SEC: XI A B

SUBJECT: COMPUTER SCIENCE TOPIC: LIST IN PYTHON


SUBJECT TEACHER: MS. ASIMA CHAKRABARTY
1 The data type list is an ordered sequence which is and made up of one or more elements.
a. Mutable
b. Immutable
c. Both a) and b)
d. None of the above
2 Which statement from the list below will be create a new list?
a. new_l = [1, 2, 3, 4]
b. new_l = list()
c. Both a) and b)
d. None of the above
3 What will be the output of the following python code
new_list = [‘P’,’y’,’t’,’h’,’o’,’n’]
print(len(new_list))
a. 6 b. 7 c. 8 d. 9
4 Python allows us to replicate a list using repetition operator depicted by symbol .
a. – b. + c. / d. *
5 We can access each element of the list or traverse a list using a .
a. for loop b. while loop
c. Both a) and b) d. None of the above
6 a single element passed as an argument at the end of the list.
a. append() b. extend()
c. insert() d. None of the above
7 returns index of the first occurrence of the element in the list. If the element is not
present, ValueError is generated.
a. insert() b. index()
c. count() d. None of the above
8 function returns the element whose index is passed as parameter to this function and also
removes it from the list.
a. push() b. remove()
c. pop() d. None of the above
9 What will be the output of the following python code. new_list = “1234”
print(list(new_list))
a. [‘1’, ‘2’, ‘3’, ‘4’] b. (‘1’, ‘2’, ‘3’, ‘4’)
c. {‘1’, ‘2’, ‘3’, ‘4’} d. None of the above
10 Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], which of the following is correct syntax for slicing
operation?
a) print(list1[0]) b) print(list1[:2])
c) print(list1[:-2]) d) all of the mentioned

11 Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1] ?


a) Error b) None c) 25 d) 2
12 Suppose list1 is [1, 3, 2], What is list1 * 2 ?
a) [2, 6, 4] b) [1, 3, 2, 1, 3]
c) [1, 3, 2, 1, 3, 2] d) [1, 3, 2, 3, 2, 1].
13 What is the output when following code is executed ?
>>>list1 = [11, 2, 23]
>>>list2 = [11, 2, 2]
>>>list1 < list2 is
a) True b) False c) Error d) None
14 To insert 5 to the third position in list1, we use which command?
a) list1.insert(3, 5)
b) list1.insert(2, 5)
c) list1.add(3, 5)
d) list1.append(3, 5)
In the following questions(15 to 20) , a statement of assertion (A) is followed by a statement of
reason(R) . Make the correct choice as :
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False (or partially True)
(d) A is false( or partially True) but R is True

15 Assertion: In python, unlike other types, you can change elements of a list in place.
Reason: Lists are mutable sequences.
16 Assertion: Any comma-separated group of values creates a list.
Reason: Only a group of comma-separated values or expressions enclosed in [ ]
, creates a list.
17 Assertion: Lists and strings have similar types of indexing.
Reason: Both lists and strings have two-way indexing , forward indexing and backward
indexing.
18 Assertion :Lists are similar to strings in a number of ways like indexing , slicing and accessing
individual elements.
Reason : Lists, unlike strings , are mutable.
19 Assertion : The membership operators in and not in work in the same way on lists as they do ,
with strings.
Reason :Some operators work differently on strings and lists , such as + and * .
20 Assertion: A list slice is an extracted part of a list.
Reason: A list slice is a list in itself.
21 If a is [1,2,3],is a*3 equivalent to a+ a+a?
22 If ai s[1,2,3],what is the meaning of a[1:1]=9?
23 WAP to Calculate mean of the given list of numbers.
24 Differentiate between append( ) and extend ( ) functions in Python.
25 WAP to count the frequency of a given element in the list of numbers
26 WAP to search for an element in a given list of numbers.
27 WAP to find minimum element from a list of elements along with its index in the list

You might also like