For a Multipe Choice Quizz, with 4 possible answers for each questins ABC or D (only one correct), I am looking for a way to compare the 2 strings so as to be able to multiply them by the number of point per questions. Note also that I can get also a 0 (zero) if question Not answered, and "X" if several answers chosen.
So for 5 questions I get a string with 5 letters e.g. "ABXC0"
I look for a function to compare it to the correct answers e.g. "ABCDD"
I need the result in an array so here "11000", so as to be able to mutliply each correct answers by the number of points e.g. "22233"
So for 5 questions I get a string with 5 letters e.g. "ABXC0"
I look for a function to compare it to the correct answers e.g. "ABCDD"
I need the result in an array so here "11000", so as to be able to mutliply each correct answers by the number of points e.g. "22233"
Last edited: