Working with Lists and Dictionaries — NCERT Solutions
CBSE · Class 11 · Informatics Practices
NCERT Solutions for Working with Lists and Dictionaries, CBSE Class 11 Informatics Practices: 44 textbook questions solved step by step. Covers Exercise.
Interactive on Super Tutor
Studying Working with Lists and Dictionaries? Get the full interactive chapter.
Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for NCERT solutions and more.
Free trial, no card needed.
The first 22 solutions are open to read. The other 22 are free with a Super Tutor account.
Exercise
1(a)list1 = [12, 32, 65, 26, 80, 10]
list1.sort()
print(list1)Show solution
sort() changes the list in place and arranges the elements in ascending order.
So after sorting:
- original list:
[12, 32, 65, 26, 80, 10] - sorted list:
[10, 12, 26, 32, 65, 80]
print(list1) displays that sorted list.
1(b)list1 = [12, 32, 65, 26, 80, 10]
sorted(list1)
print(list1)Show solution
sorted(list1) creates a new sorted list but does not change list1.
So list1 remains the same:
[12, 32, 65, 26, 80, 10]
1(c)list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
list1[::-2]
list1[:3] + list1[3:]Show solution
list1[::-2]takes the list in reverse order with step size 2, so it gives elements at positions 9, 7, 5, 3, 1.- Result:
[10, 9, 8, 7, 6] list1[:3] + list1[3:]joins the first 3 elements and the remaining elements.list1[:3] = [1, 2, 3]list1[3:] = [4, 5, 6, 7, 8, 9, 10]- Combined result:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1(d)list1 = [1, 2, 3, 4, 5]
list1[len(list1)-1]Show solution
len(list1) = 5, so len(list1)-1 = 4.
list1[4] is the last element of the list, which is 5.
2(a)myList.append([50, 60])Show solution
append() adds its argument as a single element at the end of the list.
So starting with myList = [10, 20, 30, 40], after myList.append([50, 60]) the new list becomes:
[10, 20, 30, 40, [50, 60]]
2(b)myList.extend([80, 90])Show solution
extend() adds each element of the given list separately to the end of the list.
So if myList = [10, 20, 30, 40], then after myList.extend([80, 90]) the list becomes:
[10, 20, 30, 40, 80, 90]
If the question is treated as continuing from part (a) on the same original list before any change, the correct effect of extend([80, 90]) is to append 80 and 90 individually. The chapter’s concept is that extend() does not add the whole list as one item.
3myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for i in range(0, len(myList)):
if i%2 == 0:
print(myList[i])Show solution
The loop runs through all indices from 0 to 9. It prints the element only when i % 2 == 0, i.e. for even indices:
i=0→1i=2→3i=4→5i=6→7i=8→9
So the output is:
1
3
5
7
94(a)myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
del myList[3:]
print(myList)Show solution
del myList[3:] deletes all elements from index 3 to the end.
Starting list:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
After deletion, the remaining list is:[1, 2, 3]
4(b)myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
del myList[:5]
print(myList)Show solution
del myList[:5] deletes elements from the start up to index 4.
So from:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
the remaining list is:[6, 7, 8, 9, 10]
4(c)myList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
del myList[::2]
print(myList)Show solution
del myList[::2] deletes every second element starting from index 0.
So elements at indices 0, 2, 4, 6, 8 are removed:
- removed:
1, 3, 5, 7, 9 - remaining:
2, 4, 6, 8, 10
Final list:[2, 4, 6, 8, 10]
5Differentiate between append() and extend() methods of list.Show solution
append() adds its argument as a single element at the end of the list.
extend() adds each element of the given list/iterable separately to the end of the list.
Example:
myList.append([50, 60])→[..., [50, 60]]myList.extend([50, 60])→[..., 50, 60]
6(a)list1 * 2Show solution
list1 * 2 means the list contents are repeated 2 times.
If list1 = [6, 7, 8, 9], then:
[6, 7, 8, 9] * 2 = [6, 7, 8, 9, 6, 7, 8, 9]
6(b)list1 *= 2Show solution
list1 *= 2 repeats the list and updates the same list in place.
So the final list becomes:[6, 7, 8, 9, 6, 7, 8, 9]
6(c)list1 = list1 * 2Show solution
list1 = list1 * 2 creates the repeated list and then reassigns it back to list1.
So the new value of list1 is:[6, 7, 8, 9, 6, 7, 8, 9]
7(a)Percentage of the studentShow solution
In the given list stRecord = ['Raman', 'A-36', [56, 98, 99, 72, 69], 78.8], the percentage is the 4th element.
So the statement is:
stRecord[3]
7(b)Marks in the fifth subjectShow solution
The marks in the fifth subject are stored inside the nested list [56, 98, 99, 72, 69].
The fifth subject is at index 4, so the statement is:
stRecord[2][4] = 69
7(c)Maximum marks of the studentShow solution
The marks list is [56, 98, 99, 72, 69].
The maximum mark is found using max(stRecord[2]).
So the answer is 99.
7(d)Roll No. of the studentShow solution
The roll number is the second element of stRecord.
So the statement is:
stRecord[1] = 'A-36'
7(e)Change the name of the student from 'Raman' to 'Raghav'Show solution
The name is the first element of the list stRecord.
To change the name from 'Raman' to 'Raghav', overwrite that element:
stRecord[0] = 'Raghav'This modifies the list because lists are mutable.
8(a)print(stateCapital.get("Bihar"))Show solution
dict.get("Bihar") returns the value mapped to the key Bihar.
From the dictionary:"Bihar" : "Patna"
So the output is:Patna
8(b)print(stateCapital.keys())Show solution
keys() returns a view of all the keys in the dictionary.
So the output is:
dict_keys(['Assam', 'Bihar', 'Maharashtra', 'Rajasthan'])
8(c)print(stateCapital.values())Show solution
values() returns a view of all the values in the dictionary.
So the output is:
dict_values(['Guwahati', 'Patna', 'Mumbai', 'Jaipur'])
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
print(stateCapital)
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Expected output : {3': 1, 's': 4, 'r': 2, 'u': 6, 'w': 0, 'c': 8, 'e': 3, 'o': 5}
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
Free with a Super Tutor account
- Accept details of the n students (n is the number of students).
- Search details of a particular student on the basis of roll number and display result.
- Display the result of all the students.
- Find the topper amongst them.
- Find the subject toppers amongst them.
Free with a Super Tutor account
22 more solved questions in Working with Lists and Dictionaries
They are free with a Super Tutor account, along with practice quizzes and flashcards for this chapter. Free to start, no card needed.
Frequently Asked Questions
What are the important topics in Working with Lists and Dictionaries for CBSE Class 11 Informatics Practices?
Are these NCERT Solutions for Working with Lists and Dictionaries free?
How should I revise Working with Lists and Dictionaries for Class 11 exams?
Sources & Official References
- NCERT Official — ncert.nic.in
- CBSE Academic — cbseacademic.nic.in
- CBSE Official — cbse.gov.in
- National Education Policy 2020 — education.gov.in
Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.
More resources for Working with Lists and Dictionaries
Practice Quiz
Test yourself with a quick quiz
Important Questions
Exam-style questions with answers
Revision Notes
Key points for last-minute revision
Formula Sheet
The chapter's formulas in one place
Chapter Summary
Understand the chapter at a glance
Concept Maps
See how topics connect
Study Plan
Step-by-step plan for this chapter
Flashcards
Quick-fire cards for active recall
Syllabus
What topics to cover
For serious students
Get the full Working with Lists and Dictionaries chapter — start free.
Quizzes, flashcards, an AI doubt solver and a study plan for CBSE Class 11 Informatics Practices. Free to start, no card needed.