37. The overall grade in a course is determined from the grades of 10 homework assignments, 2...

Question:

37. The overall grade in a course is determined from the grades of 10 homework assignments, 2 midterms, and a final exam, using the following scheme:

Homework: Homework assignments are graded on a scale from 0 to 80. The grade of the two lowest assignments is dropped and the average of the eight assignments with the higher grades constitutes 20% of the course grade.

Midterms and final exam: Midterms and final exams are graded on a scale from 0 to 100. If the average of the midterm scores is higher than, or the same as, the score on the final exam, the average of the midterms constitutes 40% of the course grade and the grade of the final exam constitutes 40% of the course grade. If the final exam grade is higher than the average of the midterms, the average of the midterms constitutes 30% of the course grade and the grade of the final exam constitutes 50% of the course grade.

Write a computer program in a script file that determines the course grade for a student. The program first asks the user to enter the 10 homework assignment grades (in a vector), two midterm grades (in a vector), and the grade of the final. Then the program calculates a numerical course grade

(a number between 0 and 100). Execute the program for the following cases:

(a) Homework assignment grades: 65, 79, 80, 50, 71, 73, 61, 70, 69, 74. Midx1 term grades: 83, 91. Final exam: 84.

(b) Homework assignment grades: 70, 69, 83, 45, 90, 89, 52, 78, 100, 87.
Midterm grades: 87, 72. Final exam: 90.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: