Question: Create the necessary Python code to meet the following user requirements. Background: The local driver s license office has asked you to create an application

Create the necessary Python code to meet the following user requirements.
Background: The local drivers license office has asked you to create an application that
automatically grades the written portion of the drivers license exam. The written exam is a 20
question multiple choice test and a minimum passing score is 15 out of 20.
The application should be a Python console application
The application should store the correct answers in a list
Student responses will be provided in a text file. Each line of the file consists of a student name
and their responses to the written exam.
The application should grade each student and provide the following as a summary for each
student...
o The number of correct responses
o The number of incorrect responses
o A list of the question numbers answered incorrectly
o A message indicating whether the student passed or failed.
The correct answers are:
1. A
2. C
3. A
4. A
5. D
6. B
7. C
8. A
9. C
10. B
11. A
12. D
13. C
14. A
15. D
16. C
17. B
18. B
19. D
20. A
The external file of student scores is provided with the assignment (StudentResponses.txt). Be sure
to copy this text file into your DriversLicenseExam project folder. The data contained in the file is:
MIKE,A,C,A,A,D,B,C,A,C,B,A,D,C,A,D,B,B,B,C,A
JOHN,A,C,B,B,C,B,C,A,C,B,B,C,C,B,C,C,B,B,D,A
MARY,A,C,A,A,D,B,C,A,C,B,A,D,C,A,D,C,B,B,D,A
ELLEN,B,B,B,A,C,B,C,A,B,B,A,D,C,A,D,C,C,C,D,A
MARK,A,A,A,A,B,B,C,A,C,A,A,D,C,A,B,C,B,B,B,D
Tips for creating your program:
o Create a list to store the correct answers to the test.
o Use a loop to do the following:
1. Read in the student answers (line by line) and create a list for the data
contained within each line.
2. You can compare the items in the student response list to the items in the
correct answers list to determine if the student got the question correct or not.
3. Use a list to store the question numbers that are answered incorrectly.
4. Print a summary for each student as you process them

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!