Question: Part 3 omputer ProgragamjA re going to write code to grade the exams for a given section. The exam was a 25- question, multiple-choice exam

 Part 3 omputer ProgragamjA re going to write code to grade
the exams for a given section. The exam was a 25- question,

Part 3 omputer ProgragamjA re going to write code to grade the exams for a given section. The exam was a 25- question, multiple-choice exam Here is a string that represents the answer key answer-key . "B,A,D,D,,B,D,A,c,c,o,8.A,B,A,C,B,D:A,C,A,A,B,D,0. Your program should use this key to compute a score for each valld line of data. Scores can be computed as follows o +4 points for everyright answer o O points for every skipped answer -1 point for every incorrect answer You will also want to compute the following statistics for the entire class: o The average score o The highest score o The Jowest score The range of scores (the highest minus the lowest) o The median value (Sort the grades in ascending order. If the or students is odd you can take the middle of all the grades (Le. 10. 50, 100)--the median is 50). If the # of students is even you can compute the mean by averaging the middle two values (i.e. [0, 50, 60, 100]-the median is Hint: Once you've scored the students you should use a ist to store indlvidual student scores: you can then compute statistics after you've examined every student in the We Here is a sample running of your prograni for the first two data files. A complete listing of the expected output for all data files can be found in the downloadable package for this assignment Enter a class to grade (i.e. classl for classi.txt): classi Successfully opened class1.txt ANALYZING 8 0 Lowest score: 59 puter Progra scores: 32 core: 73. Enter a class to grade (.e. clasi for class1.txt): class2 Successfully opened class2.txt ANALYZING Invalid Line of data: does not contain exactly 26 values: Neea0ee23,,A,D,D,C,B,D,A,C,C,,C,,B,A,C,B, D,A, C,A,A Invalid tine of data: N# s invalid Neeee082,B,A,D.D.C,B.D,A,C,D,D,D,A, ,A,C,D,,A, C,A, A, B,D,D n Year Invalid line of data: N# is invalid NAB800827,B,A,D,D,,8, ,A,C,B.D,B,A,,A,C,B, D,A. ,A,A,B,DD Invalid line of data: does not contain exactly 26 values: Neeeeae35.B, A, D,D,B,8, ,Arc,,D,B,A,B,A,A,B,D,A,C,A,C,B, D,D,A,A REPORT Total valid lines of data: 21 Total invalid lines of data: 4 Mean (average) score: 78.0 Highest score: 100 Lowest score: 66 Range of scores:34 Median score: 76 Part 4 Finally, have your program generate a "results" file that contains the detailed results for each 6 8 9 Part 3 omputer ProgragamjA re going to write code to grade the exams for a given section. The exam was a 25- question, multiple-choice exam Here is a string that represents the answer key answer-key . "B,A,D,D,,B,D,A,c,c,o,8.A,B,A,C,B,D:A,C,A,A,B,D,0. Your program should use this key to compute a score for each valld line of data. Scores can be computed as follows o +4 points for everyright answer o O points for every skipped answer -1 point for every incorrect answer You will also want to compute the following statistics for the entire class: o The average score o The highest score o The Jowest score The range of scores (the highest minus the lowest) o The median value (Sort the grades in ascending order. If the or students is odd you can take the middle of all the grades (Le. 10. 50, 100)--the median is 50). If the # of students is even you can compute the mean by averaging the middle two values (i.e. [0, 50, 60, 100]-the median is Hint: Once you've scored the students you should use a ist to store indlvidual student scores: you can then compute statistics after you've examined every student in the We Here is a sample running of your prograni for the first two data files. A complete listing of the expected output for all data files can be found in the downloadable package for this assignment Enter a class to grade (i.e. classl for classi.txt): classi Successfully opened class1.txt ANALYZING 8 0 Lowest score: 59 puter Progra scores: 32 core: 73. Enter a class to grade (.e. clasi for class1.txt): class2 Successfully opened class2.txt ANALYZING Invalid Line of data: does not contain exactly 26 values: Neea0ee23,,A,D,D,C,B,D,A,C,C,,C,,B,A,C,B, D,A, C,A,A Invalid tine of data: N# s invalid Neeee082,B,A,D.D.C,B.D,A,C,D,D,D,A, ,A,C,D,,A, C,A, A, B,D,D n Year Invalid line of data: N# is invalid NAB800827,B,A,D,D,,8, ,A,C,B.D,B,A,,A,C,B, D,A. ,A,A,B,DD Invalid line of data: does not contain exactly 26 values: Neeeeae35.B, A, D,D,B,8, ,Arc,,D,B,A,B,A,A,B,D,A,C,A,C,B, D,D,A,A REPORT Total valid lines of data: 21 Total invalid lines of data: 4 Mean (average) score: 78.0 Highest score: 100 Lowest score: 66 Range of scores:34 Median score: 76 Part 4 Finally, have your program generate a "results" file that contains the detailed results for each 6 8 9

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!