Worksheets › Class 11 › Working with Lists and Dictionaries

Class 11 · Informatics Practices worksheet

Working with Lists and Dictionaries

CBSE Informatics Practices. Indexing and slicing, list operators and methods, len, min, max and sum, dictionary keys, values and items, update, del and traversal. Every sheet has 20 questions in three sections and an answer key, and the questions change every time.

Open a printable sample sheet

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. 1.

    The index of the first element of a list is:

    1. −1
    2. the length of the list
    3. 1
    4. 0
    Answer

    (d) 0

  2. 2.

    What does this print? a = [78, 81, 73, 55, 75, 72] print(a[4])

    1. 55
    2. 72
    3. 75
    4. 73
    Answer

    (c) 75

    indexes start at 0, so a[4] is item 5

  3. 3.

    What does this print? a = [12, 16, 38, 14, 59] print(a[::-1])

    1. [59, 14, 38, 16, 12]
    2. [16, 38, 14, 59]
    3. [59, 38, 16, 14, 12]
    4. [59, 14, 38, 16]
    Answer

    (a) [59, 14, 38, 16, 12]

    a step of −1 walks the list backwards

Section B · short answer

  1. 4.

    Distinguish between append() and extend().

    Answer

    append() adds its argument as one element at the end; extend() adds each element of an iterable at the end.

  2. 5.

    What is in a at the end? Write the items separated by commas. a = [67, 35, 59, 25, 56, 55] a.pop(0) a.pop(3) a.insert(1, 13)

    Answer

    35, 13, 59, 25, 55

    carry out each line in turn

Section C · long answer

  1. 6.

    Explain any six list methods with an example of each.

    Answer

    append (L.append(5)), insert (L.insert(1, 9)), extend (L.extend([3, 4])), remove (L.remove(9)), pop (L.pop()), sort (L.sort()); also count, index and reverse.

Fresh sheets for your child

In the app, every Working with Lists and Dictionaries 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.

More Class 11 Informatics Practices