Informatics Practices

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'

Python List Manipulation

8 Likes

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]

Answered By

6 Likes


Related Questions