The overall purpose of this lab is to provide students an overview of the basic Python scripting concepts.
The Motor Vehicle Administration has asked you to write a script that grades the written portion of the Driver's License exam. The Exam has a 10 multiple choice questions with the answers for the questions 110 respectively shown in the list below;
A | B | D | A | B | B | B | C | C | D |
Your script should store the correct answer shown above in a list. It should then ask for each student's ID and answers for the 10 questions. After the answers have been entered for each student, store the result of the students score in a dictionary. The key of the dictionary should be the student ID and the number of correct answers the value.
Using the dictionary created, display the result for all students indicating if they passed or failed. A student must correctly answer 8 out of 10 questions to pass the exam. Your script should also display the percentage of students who passed the test in a given day.
NB: Do not prompt the user for number of students.
Sample Report for 6 students
ID | Correct | Wrong | Pass/Fail |
2 | 8 | 2 | Pass |
1 | 9 | 1 | Pass |
5 | 6 | 4 | Fail |
4 | 7 | 3 | Fail |
8 | 8 | 2 | Pass |
6 | 10 | 0 | Pass |
66.7% of students passed the test