Worksheets › Class 11 › Lists
Class 11 · Computer Science worksheetLists
CBSE Computer Science. Indexing and slicing, list operations and methods, nested lists, copying, and programs for maximum, mean, linear search and frequency. Every sheet has 20 questions in three sections and an answer key, and the questions change every time.
Sample questions
Real questions from this chapter, as the app sets them. Tap Answer to see the answer and working.
Section A · multiple choice
- 1.
Lists in Python are:
- limited to numbers
- always sorted
- immutable like strings
- mutable: items can be changed in place
Answer
(d) mutable: items can be changed in place
- 2.
What does this program print? L = [58, 39, 40, 36, 27, 51] print(L[-2:-1])
- [36]
- []
- [51, 27, 36, 40, 39, 58]
- [27]
Answer
(d) [27]
start is included, stop is not; a negative index counts from the end
- 3.
What does this program print? L = [4, 10, 19] print(L.append(34))
- None
- 34
- Error
- [4, 10, 19, 34]
Answer
(a) None
append() changes the list and gives back None
Section B · short answer
- 4.
What is the difference between append() and extend()?
Answer
append() adds its argument as one item (even a whole list); extend() adds each item of the given list.
- 5.
What does this program print? Give (a) the first line (b) the second. L = [17, 45, 32, 30, 33, 50, 53] print(L[4:7:2]) print(L[3:6])
Answer
(a) [33, 53]; (b) [30, 33, 50]
start is included, stop is not
Section C · long answer
- 6.
Explain any six list methods with an example of each.
Answer
append (adds one item), extend (adds items of a list), insert (adds at a position), remove (first match), pop (removes by index), sort (in place); e.g. [3, 1].sort() makes [1, 3].
Fresh sheets for your child
In the app, every Lists sheet is new: the app remembers the questions your child has already had and leaves them out. Print the sheet as a PDF, or use notebook mode and write the answers in a notebook.
Coming soon for Android and iPhone.