Question: Python contains a two-dimensional array representing the grades for a made-up course. Each row of the array represents a student, while each column of the
Python contains a two-dimensional array representing the grades for a made-up course. Each row of the array represents a student, while each column of the array represents an assignment.
If the following two-dimensional array was contained within the python file:
gradebook = [[100, 100, 100, 96], [97, 87, 92, 88], [91, 90, 92, 91]]
Then you can think of the two-dimensional array as the following spreadsheet:
|
| Assignment 1 | Assignment 2 | Assignment 3 | Assignment 4 |
| Student 1: | 100 | 100 | 100 | 96 |
| Student 2: | 97 | 87 | 92 | 88 |
| Student 3: | 91 | 90 | 92 | 91 |
And the program should print off the following when ran:
Assignment Averages: Assignment 1: 96.00 Assignment 2: 95.67 Assignment 3: 94.67 Assignment 4: 91.67 Student Averages: Student 1: 99.00 Student 2: 93.50 Student 3: 91.00
The output is to be nicely formatted. All averages are to be displayed to two decimal point (example: 97.67).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
