Question: First, create a project named HW 1 ; Second, create a module named Grade . In this module, you need to define two

First, create a project named "HW1";
Second, create a module named "Grade" . In this module, you need to define two functions:
1) calc_average: this function receives a list of scores, then calculates the average of scores in this function and return the average.
2) converter : this function receives a score, verifies it is a valid grade (0~100) first, and then coverts the score into a letter grade based on the criteria in the following table and returns the letter grade.
P1-Grade.jpg
Third, create another module named "Grade_Tester". This module will import the Grade module. Tester will test the functions defined in Grade module. To test the functions, it will ask users dynamically enter 5 grades and then pass the grades to the Grade.calc_average(), then call Grade. converter() to convert the average grade into a letter grade and display it on screen. When finish one-round testing, the Tester allows users to continue to test more grades. Attach your testing runs data to the Tester module and save the data.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!