Advertisements
Chapters
![NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
Advertisements
Solutions for Chapter 9: Lists
Below listed, you can find solutions for Chapter 9 of CBSE NCERT for Computer Science [English] Class 11.
NCERT solutions for Computer Science [English] Class 11 9 Lists Exercise [Pages 204 - 206]
What will be the output of the following statement?
list1 = [12,32,65,26,80,10]
list1.sort()
print(list1)
What will be the output of the following statement?
list1 = [12,32,65,26,80,10]
sorted(list1)
print(list1)
What will be the output of the following statement?
list1 = [1,2,3,4,5,6,7,8,9,10]
list1[::-2]
list1[:3] + list1[3:]
What will be the output of the following statement?
list1 = [1,2,3,4,5]
list1[len(list1)-1]
Consider the following list myList. What will be the elements of myList after the following operation:
myList = [10,20,30,40]
myList.append([50,60])
Consider the following list myList. What will be the elements of myList after the following operation:
myList = [10,20,30,40]
myList.extend([80,90])
What will be the output of the following code segment:
myList = [1,2,3,4,5,6,7,8,9,10]
for i in range(0,len(myList)):
if i%2 == 0:
print(myList[i])
What will be the output of the following code segment:
myList = [1,2,3,4,5,6,7,8,9,10]
del myList[3:]
print(myList)
What will be the output of the following code segment:
myList = [1,2,3,4,5,6,7,8,9,10]
del myList[:5]
print(myList)
What will be the output of the following code segment:
myList = [1,2,3,4,5,6,7,8,9,10]
del myList[::2]
print(myList)
Differentiate between append() and extend() functions of list.
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 * 2
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 *= 2
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 = list1 * 2
The record of a student (Name, Roll No., Marks in five subjects and percentage of marks) is stored in the following list: stRecord = ['Raman', 'A-36', [56, 98, 99, 72, 69], 78.8]
Write Python statements to retrieve the following information from the list stRecord.
- Percentage of the student
- Marks in the fifth subject
- Maximum marks of the student
- Roll no. of the student
- Change the name of the student from ‘Raman’ to ‘Raghav’.
Programming Problems
Write a program to find the number of times an element occurs in the list.
Write a program to read a list of n integers (positive as well as negative). Create two new lists, one having all positive numbers and the other having all negative numbers from the given list. Print all three lists.
Write a function that returns the largest element of the list passed as a parameter.
Write a function to return the second largest number from a list of numbers.
Write a program to read a list of n integers and find their median.
Note: The median value of a list of values is the middle one when they are arranged in order. If there are two middle values then take their average.
Hint: You can use a built-in function to sort the list.
Write a program to read a list of elements. Modify this list so that it does not contain any duplicate elements, i.e., all elements occurring multiple times in the list should appear only once.
Write a program to read a list of elements. Input an element from the user that has to be inserted in the list. Also, input the position at which it is to be inserted. Write a user-defined function to insert the element at the desired position in the list.
Write a program to read elements of a list.
The program should ask for the position of the element to be deleted from the list. Write a function to delete the element at the desired position in the list.
Write a program to read elements of a list.
The program should ask for the value of the element to be deleted from the list. Write a function to delete the element of this value from the list.
Read a list of n elements. Pass this list to a function that reverses this list in place without creating a new list.
Solutions for 9: Lists
![NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists - Shaalaa.com](/images/computer-science-english-class-11_6:f845d20929ea4abdb3a8e0cf9f430d7f.jpg)
NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists
Shaalaa.com has the CBSE Mathematics Computer Science [English] Class 11 CBSE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. NCERT solutions for Mathematics Computer Science [English] Class 11 CBSE 9 (Lists) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.
Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. NCERT textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.
Concepts covered in Computer Science [English] Class 11 chapter 9 Lists are List, List Operations, Traversing a List, List Methods and Built-in Functions, Nested Lists, Copying Lists, List as Argument to a Function, List Manipulation.
Using NCERT Computer Science [English] Class 11 solutions Lists exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in NCERT Solutions are essential questions that can be asked in the final exam. Maximum CBSE Computer Science [English] Class 11 students prefer NCERT Textbook Solutions to score more in exams.
Get the free view of Chapter 9, Lists Computer Science [English] Class 11 additional questions for Mathematics Computer Science [English] Class 11 CBSE, and you can use Shaalaa.com to keep it handy for your exam preparation.