Canadian Computing Competition: 2011 Stage 1, Senior #2
Your teacher likes to give multiple choice tests. One benefit of giving these tests is that they are easy to mark, given an answer key. The other benefit is that students believe they have a one-in-five chance of getting the correct answer, assuming the multiple choice possibilities are A
, B
, C
, D
or E
.
Write a program that your teacher can use to grade one multiple choice test.
Input Specification
The input will contain the number A
, B
, C
, D
or E
on each line), followed by A
, B
, C
, D
or E
on each line), in the same order as the student answered the questions (that is, if line
Output Specification
Output the integer
Sample Input 1
3
A
B
C
A
C
B
Output for Sample Input 1
1
Sample Input 2
3
A
A
A
A
B
A
Output for Sample Input 2
2
Comments
Hey everyone, use AI to understand the question, not just to look for the answer. Ask the AI for explanations—it helps me a lot.
Why are problems in this website written so terribly? This one in particular made me want to tear my hair out. Unreal...
This comment is hidden due to too much negative feedback. Show it anyway.
people will copy paste it and get free points
I do not understand why I am getting an IndexError when I run this in the solution. It works just fine in VSCode
I'm getting the same IndexError and my code works fine in Mu Editor. Were you able to figure out what was going wrong?
Don't post your solution here