i want to compare a student's answer to the model answer. the student undertakes a test of multiple choice questions. there is a total of 5 questions and each question has 3 multiple choices. the student chooses the following choices for all questions: "12231". e.g: for Q(1): student picks option "1",for Q(2): student picks option "2"...etc. now, i need to calculate the student's total mark by comparing it with the Model answer: "12132". This student received a mark of 3/5. The student's answer will always be as the same length as the model one. e.g. the student wont skip any questions.
i need to do the exact same thing, but with hundreds of students. can i do it using a code? i can only think of using a for loop and iterating the students answer, but i cannot think of a way to compare both together and calculate the student's mark.