Python question please include all steps and screenshot of code. Also please provide a docstring, and comments throughout the code, and test the given examples below. Thanks. Write a function called honorRoll(). Its only input parameter is a list that contains lists consisting of a name followed by a series of grades (integers). All grades will be in the range 0-100. All students will have at least one grade, but not all students will have the same number of grades. Your function should return a list of students whose average grade is above 92.0. >>> honorRoll([['Alice', 95, 92, 98], ['Carlos', 85, 87, 95, 91], ['Betty', 81, 74, 89]]) ['Alice'] >>> honorRoll([['Alice', 92, 92, 92], ['Bob', 81, 46]]) []
Python question please include all steps and screenshot of code. Also please provide a docstring, and comments throughout the code, and test the given examples below. Thanks.
Write a function called honorRoll(). Its only input parameter is a list that contains lists
consisting of a name followed by a series of grades (integers). All grades will be in the
range 0-100. All students will have at least one grade, but not all students will have the
same number of grades. Your function should return a list of students whose average
grade is above 92.0.
>>> honorRoll([['Alice', 95, 92, 98], ['Carlos', 85, 87, 95, 91], ['Betty', 81, 74, 89]])
['Alice']
>>> honorRoll([['Alice', 92, 92, 92], ['Bob', 81, 46]])
[]
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images