AmbifulWorksheets
Practice that never repeats
CBSE · Class 11 · Informatics Practices

Working with Lists and Dictionaries

Standard difficulty · 20 questions · 40 marks · Time: 40 minutes

Name: Date: Score: ____ / 40

Show your working for Sections B and C. Answers are on the last page — try every question first!

Section A — Choose the correct answer8 × 1 = 8 marks
1.
The index of the first element of a list is:
  1. −1
  2. the length of the list
  3. 1
  4. 0
2.
What does this print?
a = [78, 81, 73, 55, 75, 72]
print(a[4])
  1. 55
  2. 72
  3. 75
  4. 73
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]
4.
What does this print?
print([26, 13] + [54, 47])
  1. [[26, 13], [54, 47]]
  2. [26, 13, 54, 47]
  3. [80, 60]
  4. [54, 47, 26, 13]
5.
What does this print?
a = [1, 10, 12, 10, 1, 12, 19]
print(a.index(1))
  1. 0
  2. 1
  3. 4
  4. 2
6.
What does this print?
d = {'Manav': 38, 'Rahul': 63, 'Naina': 51, 'Nikhil': 41}
d['Manav'] = 89
d['Ritu'] = 53
del d['Naina']
print(d['Manav'])
  1. 88
  2. 38
  3. 90
  4. 89
7.
What does this print?
d = {'Naina': 74, 'Tanvi': 99, 'Pooja': 96, 'Ishaan': 86, 'Lakshmi': 90}
print('Pooja' in d)
  1. True
  2. False
  3. None
  4. Error
8.
What does this print?
d = {'Gauri': 94, 'Ishaan': 98, 'Tanvi': 90, 'Naina': 39}
print(max(d.values()))
  1. 99
  2. 98
  3. 39
  4. 94
Section B — Short answer8 × 2 = 16 marks
9.
Distinguish between append() and extend().
10.
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)
11.
What is in a after these lines? Write the items separated by commas.
a = [54, 20, 59, 3, 13, 2, 76]
a.sort()
12.
a = [80, 27, 33, 17, 81]. What are (a) len(a) (b) min(a) (c) max(a) (d) sum(a)?
13.
Answer for d at the end: (a) len(d) (b) d['Sahil']
d = {'Asha': 80, 'Varun': 54, 'Pooja': 35, 'Ishaan': 75}
d['Ishaan'] = 52
d['Sahil'] = 63
del d['Varun']
14.
What does this print? Write the names separated by commas.
d = {'Tanvi': 52, 'Nikhil': 74, 'Jaya': 67, 'Bhavna': 61, 'Manav': 59, 'Farhan': 86}
for k in d:
    if d[k] >= 60:
        print(k)
15.
What does this print?
a = [35, 58, 11, 23, 59, 19, 16, 54]
a.sort()
print(a[2])
16.
Answer for d1 after these lines: (a) len(d1) (b) d1['Aarav']
d1 = {'Varun': 95, 'Aarav': 76, 'Nikhil': 73}
d2 = {'Aarav': 76, 'Deepa': 98}
d1.update(d2)
Section C — Word problems4 × 4 = 16 marks
17.
Explain any six list methods with an example of each.
18.
This program finds the highest and lowest marks. What does it print? Give (a) the first line (b) the second.
d = {'Rahul': 61, 'Ritu': 90, 'Zoya': 78, 'Farhan': 93, 'Deepa': 64}
top = 'Rahul'
low = 'Rahul'
for k in d:
    if d[k] > d[top]:
        top = k
    if d[k] < d[low]:
        low = k
print(top, d[top])
print(low, d[low])
19.
Answer (a) to (c) for this program.
a = [45, 47, 6, 37, 27]
a.extend([63, 73])
a.insert(1, 6)
p = a.pop()
print(p)
print(len(a))
print(a.index(6))
20.
A dictionary stores one student’s marks in five subjects. Find (a) sum(marks.values()) (b) the key with the highest value (c) how many subjects have marks of 70 or more.
marks = {'Eng': 85, 'Chem': 83, 'Hindi': 96, 'Maths': 41, 'Bio': 48}
AmbifulWorksheets
Practice that never repeats
CBSE · Class 11 · Informatics Practices

Answer key

Working with Lists and Dictionaries · AW-11IP-LSD-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.

QAnswerWorking
1(d) 0—
2(c) 75indexes start at 0, so a[4] is item 5
3(a) [59, 14, 38, 16, 12]a step of −1 walks the list backwards
4(b) [26, 13, 54, 47]+ joins two lists
5(a) 0index() gives the first position of 1
6(d) 89a later assignment to the same key replaces its value
7(a) True'Pooja' is a key
8(b) 98the largest value
9append() adds its argument as one element at the end; extend() adds each element of an iterable at the end.—
1035, 13, 59, 25, 55carry out each line in turn
112, 3, 13, 20, 54, 59, 76smallest to largest
12(a) 5; (b) 17; (c) 81; (d) 238count, smallest, largest, total
13(a) 4; (b) 63d ends as {'Asha': 80, 'Pooja': 35, 'Ishaan': 52, 'Sahil': 63}
14Nikhil, Jaya, Bhavna, Farhannames with 60 or more, in the order they were added
1519sorted: [11, 16, 19, 23, 35, 54, 58, 59]; the third smallest
16(a) 4; (b) 76update() replaces Aarav's value and adds Deepa
17append (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.—
18(a) Farhan 93; (b) Rahul 61each name is compared with the best and worst so far
19(a) 73; (b) 7; (c) 1after insert: [45, 6, 47, 6, 37, 27, 63, 73]; pop() removes the last item
20(a) 353; (b) Hindi; (c) 3values: 85, 83, 96, 41, 48