CBSE Class 11 Informatics Practices Question 25 of 40

Practice Paper — Question 7

Back to all questions
7
Question

Question 25

Create a list containing 10 marks the scored by the students—

(i) Write a command to insert the marks of the student at index position 4.

(ii) Write a command to know the length of the list.

Answer

The list containing 10 marks scored by the students is as follows:

marks = [85, 92, 78, 90, 88, 76, 95, 89, 84, 91]

(i)

marks.insert(4, 87) 

(ii)

l = len(marks)