Question
This program will be ran through a Python 3 IDE. The function avgavg() takes as input a list whose items are lists of three numbers.
This program will be ran through a Python 3 IDE.
The function avgavg() takes as input a list whose items are lists of three numbers. Each three-number list represents the three grades a particular student received for a course. For example, here is an input list for a class of four students:
[[95, 92, 86], [66, 75, 54], [89, 72, 100], [34, 0, 0]]
The function avgavg() should print, on the screen, two lines. The first line will contain a list containing every student's average grade. The second line will contain just one number: the average class grade, defined as the average of all student average grades.
Here is an example of how the function should work:
>>> avgavg([[95, 92, 86], [66, 75, 54], [89, 72, 100], [34, 0, 0]])
[91.0, 65.0, 87.0, 11.333333333333334]
63.5833333333
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started