Exam Statistics
Lesson 1 of 1
1. 1
Creating a program to compute statistics means that you wonâ€™t have to whip out your calculator and manually crunch numbers. All youâ€™ll have to do is supply a new set of numbers and our program doesâ€¦
2. 2
As a refresher, letâ€™s start off by writing a function to print out the list of grades, one element at a time.
3. 3
So far, youâ€™ve created a helper function that will be used in the next sections. You also have a solid handle on the concepts that weâ€™ll need to continue. The next step in the creation of our grâ€¦
4. 4
Now that we have a function to print the grades, letâ€™s create another function to compute the sum of all of the test grades. This will be super-helpful when we need to compute the average score. â€¦
5. 5
The average test grade can be found by dividing the sum of the grades by the total number of grades. Luckily, we just created an awesome function, grades_sum to compute the sum.
6. 6
Great work creating the capability to compute the average of the test grades. Weâ€™re going to use the average for computing the variance. The variance allows us to see how widespread the grades werâ€¦
7. 7
Letâ€™s see how the grades varied against the average. This is called computing the variance. A very large variance means that the studentsâ€™ grades were all over the place, while a small variance â€¦
8. 8
Great job computing the variance! The last statistic will be much simpler: standard deviation. The standard deviation is the square root of the variance. You can calculate the square root by raisiâ€¦
9. 9
Youâ€™ve done a great job completing this program. Weâ€™ve created quite a few meaningful functions. Namely, weâ€™ve created helper functions to print a list of grades, compute the sum, average, varianâ€¦