I am building a quiz that compiles scores within 4 different categories based on 4 different answers per 5 questions each for a total of 20 questions before displaying a custom ending based on which category has the highest score. How can I compare the cumulative score to 4 different variable sets and display an ending based on which of the 4 variables is higher than the others?
I have the questions mapped with the corresponding calculations but can’t figure out how to have the 4 scores compare to eachother in order to have the final ending.
The 20 question quiz asks a question and respondents choose 1 of 4 answers that maps to a value of 1-4 per question:
- strongly disagree (1)
- disagree (2)
- agree (3)
- strongly agree (4)
Then you would add up the scores for questions:
- 5, 7, 9, 13, 19 (for a total of 5-20 for @score_a)
- 1, 4, 10, 12, 15 (for a total of 5-20 @score_b)
- 2, 6, 11, 16, 18 (for a total of 5-20 @score_c)
- 3, 8, 14, 17, 20 (for a total of 5-20 @score_d)
Then you would compare the total scores to see which is greater and, based on which is greater, displays 1 of 4 endings (a, b, c or d).
The questions are intentionally mixed so it doesn’t sway the result.
How can I compare the cumulative scores to see which is greater and display the final ending based on that calculation?