This week's assignment involves writing a Python program to compute the weighted average grade for each student in a group of four students. In addition, it should determine which student has the highest average. Your program should include a list of four student names.
You decide on the names of the four students. Each student will have three grades--one for the discussion, one for the quiz and one for the programming assignment. Weighted averages work by assigning a percentage weight to each grade and then multiplying the grade. (i.e a 40% weight of a grade would be .40 * grade).
You should decide on the weights for each of the three grades, but the three weights must add to 1 and the three must be different (i.e. .20 .30 .50). Apply the appropriate weight to each grade and sum to get the weighted average.
Your program must include a function that accepts the student name, prompts the user for the three grades and computes and returns the average.
In the main program, inside a for loop, that function should be called successively and the name of the student and the student's grade should be displayed. In addition a check should be made to determine whether that student's grade is the highest so far. Once the loop completes, the name of the student with the highest grade, and that grade should be displayed. If more than one student has the highest grade, display the name of the first such student.
Your program should include Header comments (what the program does) and in-line comments (the major design steps). Document the values you chose for the student name list as well. Also document the values you chose as the weights for the three grades in your comments as well.