In Python, A local college has asked you to create a Python program which will grade a certain portion of the final. The final has 25 questions where the answer is either, A,B,C or D. Here are the correct answers:
A
D
C
B
A
A
D
C
B
A
A
D
C
B
A
A
D
C
B
A
C
D
D
D
D
You program will need to store these correct answers in a list. Also, your program should read from a text file called 'student_answers.txt' the student's answers for each of the 5 questions and place the student's answers in another list. After grading the final the program needs to display, the percentage correct and a letter grade which can be found in the grading scale below. It should then display the total number of correct answered questions, the total number of incorrectly answered questions and a list showing the question number of the incorrectly answered questions.
Finalple Output
|
Percentage Correct
|
88%
|
Letter Grade
|
B
|
You incorrectly answered
|
3 questions
|
You correctly answered
|
22 questions
|
You missed question numbers
|
1,5,12
|
Grading Scale
Test Score
|
Grade
|
>=90% and above
|
A
|
>=80% and <90%
|
B
|
>=70% and <80%
|
C
|
>=60% and <70%
|
D
|
<60% and below
|
F
|
The program should contain at least 3 functions, one for input (which should be called main), one for processing and one for output. The data will need to pass from main into your processing function and from the processing function to the output function.