In the US Higher Education sector, a degree is classified using a Grade Point Average (GPA). The grades ‘A’, ‘B’, ‘C’, ‘D’ or ‘F’ are called academic grades. Each ‘A’ is worth 4 points, each ‘B’ is worth 3 points, each ‘C’ is worth 2 points, each ‘D’ is worth 1 point and each ‘F’ is worth 0 points. The GPA is found by calculating the number of points and then dividing by the number of academic grades. A student may also have a non-academic grade of ‘W’ (for withdrew) which is not counted at all in the calculation. You can assume that the student will have at least one academic grade in their list of grades. There are many ways of calculating a GPA from a list of grades, but you must follow the algorithm given by this top-level decomposition: > Find GPA. >> Input a list of academic and non-academic grades. >> Create a new list that consists of the number of points for each academic grade in the input list. >> Add up the values in the new list and divide by the number of values in the new list. >> Print the result rounded to 2 decimal places. One of the tests for your completed program will consist of the input list [‘D’, ‘A’, ‘B’, ‘B’, ‘C’, ‘D’, ‘B’, ‘F’, ‘W’, ‘B’, ‘W’, ‘C’, ‘?’] Where the final grade, represented here by ‘?’ should be replaced by a grade determined from the first digit in your PI number. [Your PI number is the long number that starts with a letter, followed by either seven digits or six digits and an X]. If the first number in your Id number is 0, the missing grade should be ‘A’. If the first number in your Id number is a non-zero even number, the missing grade should be ‘B’. If the first number in your Id number is odd, it should be ‘C’. The first task in the top-level decomposition is to produce a list that contains the points for each academic grade. So, for example, for the list shown above, output should be [1, 4, 3, 3, 2, 1, 3, 0, 3, 2, ?] Where the ? is a 4, 3 or 2, depending on the grade determined from your Id number. In this part you will consider only this part of the top-level algorithm: >> Input a list of academic and non-academic grades. >> Create a new list that consists of the number of points for each academic grade in the input list. Id number is 1272875 1, Specify one further test in addition to the list you have created using your Id number. Make sure that you state the input and output and include a brief explanation of why you selected this test.
In the US Higher Education sector, a degree is classified using a Grade Point Average (GPA).
The grades ‘A’, ‘B’, ‘C’, ‘D’ or ‘F’ are called academic grades. Each ‘A’ is worth 4 points, each ‘B’ is worth 3 points, each ‘C’ is worth 2 points, each ‘D’ is worth 1 point and each ‘F’ is worth 0 points. The GPA is found by calculating the number of points and then dividing by the number of academic grades. A student may also have a non-academic grade of ‘W’ (for withdrew) which is not counted at all in the calculation.
You can assume that the student will have at least one academic grade in their list of grades.
There are many ways of calculating a GPA from a list of grades, but you must follow the
> Find GPA.
>> Input a list of academic and non-academic grades.
>> Create a new list that consists of the number of points for each academic grade in the input list.
>> Add up the values in the new list and divide by the number of values in the new list.
>> Print the result rounded to 2 decimal places.
One of the tests for your completed program will consist of the input list
[‘D’, ‘A’, ‘B’, ‘B’, ‘C’, ‘D’, ‘B’, ‘F’, ‘W’, ‘B’, ‘W’, ‘C’, ‘?’]
Where the final grade, represented here by ‘?’ should be replaced by a grade determined from the first digit in your PI number. [Your PI number is the long number that starts with a letter, followed by either seven digits or six digits and an X].
If the first number in your Id number is 0, the missing grade should be ‘A’.
If the first number in your Id number is a non-zero even number, the missing grade should be ‘B’.
If the first number in your Id number is odd, it should be ‘C’.
The first task in the top-level decomposition is to produce a list that contains the points for each academic grade. So, for example, for the list shown above, output should be
[1, 4, 3, 3, 2, 1, 3, 0, 3, 2, ?]
Where the ? is a 4, 3 or 2, depending on the grade determined from your Id number.
In this part you will consider only this part of the top-level algorithm:
>> Input a list of academic and non-academic grades.
>> Create a new list that consists of the number of points for each academic grade in the input list.
Id number is 1272875
1, Specify one further test in addition to the list you have created using your Id number. Make sure that you state the input and output and include a brief explanation of why you selected this test.
Step by step
Solved in 4 steps with 4 images