Question: For this assignment, you will be provided a file with actual scores and attendance information (student ID's have been changed to protect identities), and you

For this assignment, you will be provided a file with actual scores and attendance information (student ID's have been changed to protect identities), and you will write a program that 1) reads the file contents, 2) calculates a numerical and letter grade, 3) prints the student ID, numerical grade, and letter grade to a file, and 4) calculates the average and standard deviation of the final course grades.

The numerical grade is calculated as:

CourseGradePercentage = (Attendance*0.10/25 + (hw1 + hw2 + hw3 + hw4 + hw5 + hw6 + hw7)*0.35/700 + exam1*0.15/25 + exam2*0.15/25 + finalExam * 0.25/40)*100

The file that you must open to read the grade data is named "sampleGrades.txt." Keep in mind, your program should work for varying amounts of students in the sampleGrades.txt. (Do not make 6 different variables for the students) Your program must use this file name. This file has the following format:

ID Attendance hw1 hw2 hw3 hw4 hw5 hw6 hw7 exam1 exam2 finalExam

7 17 90 95 82 90.3 68 99 60 23 14 25

8 25 90 102.9 98.7 95.55 100 72 105 21 23 35

9 23 80 93 95 53 78 68 100 19 18 22

10 24 83 96 100 96 55 84 100 19 14 28

11 22 96.6 87 97 77 70 85 100 22 16 26

12 23 101.85 97 99.75 99.75 86.1 100.8 105 22 18 36

For the letter grade assignments, use this table: A+ >=97 - 100 A >=93 - <97 a->=90 - <93 b+>=87 - <90 b>=83 - <87 b->=80 - <83 c+>=77 - <80 c>=73 - <77 c->=70 - <73 d>=60 - <70 f>=0 - <60 Your program must create a file called "outputGrades.txt", and the data must be written in the following format (items are separated by a "space" character): ID Course_Percentage Letter_Grade 7 73.84 C 8 91.48 A- 9 73.50 C 10 77.60 C+ 11 78.48 C+ 12 90.21 AFinally, reopen the file you just created and calculate the average and standard deviation of the course grade and print the results to the **screen**. Use the following formulas to calculate the standard deviation (sd) of N grades with values xi, i=1, 2,N and mean: Example output printed to screen: Average Course Grade: 80.85% Sample Standard Deviation: 8.0% Lecture 4, slide 20 shows an example that sets a numerical format to "fixed" and the precision is set to "3". You can similarly do this for file output (use "fixed" and set the precision to 2 for the percentage values in your output file to have 2 decimal places right of the decimal).

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!