Lab 5 for CSC 121
Overview
For this lab you are to re-work the previous lab to use functions.
Details for computing
- Do not use any statistical packages from Python. You are to do all the computing yourself
- Write one function to get the group of grades from the user and return it as a tuple. This group of grades is terminated by a -99
- Write a second function to compute the mean (average). It should have one parameter (the tuple of grades) and return one number (the mean)
- Write a third function to compute the standard deviation. It should have one parameter (the tuple of grades) and return one number (the standard deviation)
- Write a fourth function that will compute the letter grade for a given grade based on the mean and standard deviation. It should have three parameters (grade, mean, standard deviation) and return a single letter. Use the scale from the previous lab.
- Write a main program that uses the previous functions to get a group of grades and output the letter grade for each item. It should use the previous functions.
For those that want a challenge and have successfully completed the above
Figure out how to read the grades from a file using the end of file to signal the end of the data. This is to be done on your own without help from any other person → you can use the textbook only.