CBSE Class 11 Informatics Practices Question 33 of 33

Lists in Python — Question 33

Back to all questions
33
Question

Question 28

The record of a student (Name, Roll No, Marks in five subjects and percentage of marks) is stored in the following list:

studRecord = ['Rinku', 'A-36', [56, 98, 99, 72, 69], 78.8]

Write Python statements to retrieve the following information from the list studRecord.

(a) Percentage of the student

(b) Marks in the fifth subject

(c) Maximum marks of the student

(d) Roll No. of the student

(e) Change the name of the student from 'Rinku' to 'Rajat'

Answer

(a)

percentage = studRecord[3]
Output
78.8

(b)

marks = studRecord[2][4]
Output
69

(c)

max_marks = max(studRecord[2])
Output
99

(d)

roll_no = studRecord[1]
Output
A-36

(e)

studRecord[0] = 'Rajat'
Output
['Rajat', 'A-36', [56, 98, 99, 72, 69], 78.8]
Get the Bright Tutorials app Stuck on a question? Ask Bright Buddy — your AI tutor — for step-by-step help in the app.