English

NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists [Latest edition]

Advertisements

Chapters

NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists - Shaalaa.com
Advertisements

Solutions for Chapter 9: Lists

Below listed, you can find solutions for Chapter 9 of CBSE NCERT for Computer Science [English] Class 11.


Exercise
Exercise [Pages 204 - 206]

NCERT solutions for Computer Science [English] Class 11 9 Lists Exercise [Pages 204 - 206]

Exercise | Q 1. i. | Page 204

What will be the output of the following statement?

list1 = [12,32,65,26,80,10]
list1.sort()
print(list1)
Exercise | Q 1. ii. | Page 204

What will be the output of the following statement?

list1 = [12,32,65,26,80,10]
sorted(list1)
print(list1)
Exercise | Q 1. iii. | Page 204

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:]
Exercise | Q 1. iv. | Page 204

What will be the output of the following statement?

list1 = [1,2,3,4,5]
list1[len(list1)-1]
Exercise | Q 2. i. | Page 204

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])
Exercise | Q 2. ii. | Page 204

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])
Exercise | Q 3. | Page 205

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])
Exercise | Q 4. a. | Page 205

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)
Exercise | Q 4. b. | Page 205

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)
Exercise | Q 4. c. | Page 205

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)
Exercise | Q 5. | Page 205

Differentiate between append() and extend() functions of list.

Exercise | Q 6. a. | Page 205

Consider a list:

list1 = [6, 7, 8, 9]

What is the difference between the following operation on the list1:

list1 * 2
Exercise | Q 6. b. | Page 205

Consider a list:

list1 = [6, 7, 8, 9]

What is the difference between the following operation on the list1:

list1 *= 2
Exercise | Q 6. c. | Page 205

Consider a list:

list1 = [6, 7, 8, 9]

What is the difference between the following operation on the list1:

list1 = list1 * 2
Exercise | Q 7. | Page 205

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.

  1. Percentage of the student
  2. Marks in the fifth subject
  3. Maximum marks of the student
  4. Roll no. of the student
  5. Change the name of the student from ‘Raman’ to ‘Raghav’.

Programming Problems

Exercise | Q 1. | Page 205

Write a program to find the number of times an element occurs in the list.

Exercise | Q 2. | Page 205

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.

Exercise | Q 3. | Page 206

Write a function that returns the largest element of the list passed as a parameter.

Exercise | Q 4. | Page 206

Write a function to return the second largest number from a list of numbers.

Exercise | Q 5. | Page 206

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.

Exercise | Q 6. | Page 206

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.

Exercise | Q 7. | Page 206

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.

Exercise | Q 8. a) | Page 206

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.

Exercise | Q 8. b) | Page 206

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.

Exercise | Q 9. | Page 206

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

Exercise
NCERT solutions for Computer Science [English] Class 11 chapter 9 - Lists - Shaalaa.com

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.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×