The record of a student (Name, Roll No., Marks in five subjects and percentageof marks) is stored in the following list:stRecord = ['Ahana','A-36',[56,98,99,72,69], 78.8] (2.5)Write Python statements to retrieve the following information from the liststRecord.i) Percentage of the studentii) Marks in the fifth subjectiii) Maximum marks of the studentiv) Roll no. of the student
Question
The record of a student (Name, Roll No., Marks in five subjects and percentageof marks) is stored in the following list:stRecord = ['Ahana','A-36',[56,98,99,72,69], 78.8] (2.5)Write Python statements to retrieve the following information from the liststRecord.i) Percentage of the studentii) Marks in the fifth subjectiii) Maximum marks of the studentiv) Roll no. of the student
Solution
To retrieve the required information from the list stRecord, you can use the following Python statements:
i) Percentage of the student: percentage = stRecord[3] print("Percentage of the student:", percentage)
ii) Marks in the fifth subject: marks_fifth_subject = stRecord[2][4] print("Marks in the fifth subject:", marks_fifth_subject)
iii) Maximum marks of the student: max_marks = max(stRecord[2]) print("Maximum marks of the student:", max_marks)
iv) Roll no. of the student: roll_no = stRecord[1] print("Roll no. of the student:", roll_no)
These statements will retrieve the required information from the stRecord list.
Similar Questions
# Write a function in python which accept a list of marks of students and return the# minimum mark, maximum mark and the average marks. Use the same function to test
You have a class consisting of 5 students, each with a unique name and their respective marks. As the end of the semester approaches, you decide to assess the performance of your students and recognize their academic achievements.You write a Python program to categorize the students into different grades based on their marks. The program utilizes a Grade_analyzer class to represent each student and a StudentGradeAnalyzer function to analyze their grades. The function iterates through the list of students, calculates their grades and returns a dictionary containing the count of students in each grade.For grading:Students scoring between 80-100 will be in Grade A.Students scoring between 70-80 will be in Grade B.Students scoring between 60-70 will be in Grade C.Students scoring between 50-60 will be in Grade D.Students scoring below 50 will be in Grade E.Constraints:Input Format:5 lines of input, each line containing name and marks of each student.Ouptut Format:Should display items in dictionary which is holding Grades as keys and count of students falling under the grades as values.Example:Input:john 78missy 89sheldon 90mary 45meemaw 67Output:('A', 2)('B', 1)('C', 1)('D', 0)('E', 1)Explanation:input:--------Space saperated input name and marks for all the 5 students.john 78-->78 Falls into a range 70-80 so count of grade 'B' should be increased to 1.missy 89-->89 Falls into a range 80-100 so count of grade 'A' should be increased to 1.sheldon 90-->90 Falls into a range 80-100 so count of grade 'A' should be increased to 2.mary 45-->45 is less than 50 so count of grade 'E' should be increased to 1.meemaw 67-->67 Falls into a range 60-70 so count of grade 'C' should be increased to 1.
As a python student, write a program using functions and conditions to display the grades that the students will be receiving. The grades are:90% - 100% Grade is A 80% - 89% Grade is B70% - 79% Grade is C 60% - 69% Grade is D 50% - 59% Grade is E <50% Fail
Write Python code that ask the user to enter the number of students. After that ask the user to enter a mark for each student using a loop. Save all marks into an empty list using insert() method. Display all marks after finishing data entry.For example:Test Input Result13958791Enter number of students:Enter student mark:Enter student mark:Enter student mark:----------Marks95.087.091.0257382665998Enter number of students:Enter student mark:Enter student mark:Enter student mark:Enter student mark:Enter student mark:----------Marks73.082.066.059.098.0
Write command to create a dataframe to store marks of 3 subjects . columns can be named as ["GE", "SEC","VAC "]. Rows are indexed by rollno of the students [25,30,50]
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.