Q. 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.


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 ‘Raman’ to ‘Raghav’


Answer :-

a = stRecord[ -1 ]

b = stRecord [ -2 ] [ -1 ]

c = max ( stRecord [ -2] )

d = stRecord [ 1 ]

e = stRecord [ 0 ] = 'Raghav'


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post