The History teacher needs help in grading a true/false test. The students\' ID\'
ID: 3533034 • Letter: T
Question
The History teacher needs help in grading a true/false test. The students' ID's and test answers are stored in a file (dont worry about the file). The first entry in the file contains answers to the test in this form.
T F F T F F T T T T F F T F T F T F T F
Every other entry in the file is the students ID, followed by a blank, followed by the students responses.
For example, the entry
ABC54301 T F T F T F T T T F T F T F F T T F T
indicates that the students ID is ABC54301 and the answer to question 1 is true, the question for number is false, and so on. The student did not answer question 9. The exam has 20 questions. Each correct answer is awarded two points, each wrong answer gets -1 and no answer gets 0 points.
Write a program that processes the test data. The output should be the student's ID, followed by the answers, followed by the test score, and followed by the test grade. Assume the following grade scale: 90-100 A, 80-89.99 B, 70-79.99 C, 60-69.99 D, 50.99 -0 F. Finally show the number of students who took this test.
The program should be written for any number of student results, not just 8<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
You must have the following functions:
getAnswers
Explanation / Answer
Can you provide the data file with all the student answers? It's kind of hard to tell from the description above how it looks like. For example, "ABC54301 T F T F T F T T T F T F T F F T T F T" It says that he didn't answer question 9, but there is no indication that question 9 wasn't answered from that example text. Are we to assume is it a empty space where the question 9 answer would have been? Without knowing how this is processed the grades could be off by quite a lot.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.