How to make a percentage of correct and wrong choices?

Sorry if the title is a bit confusing, I couldn't think of a proper way to word it, but let me explain better here:

Essentially there is a game somewhat like 21 questions going on. I want it to be so that if the player chooses over 50% of the questions right, they can continue on to the good ending. If they fail and get under 50%, they get a bad ending.

Is there an easier way to do this with labels or something, or is there a system like this available? I'm a bit of a newbie to Visual Novel Maker, so if you could talk to me like I'm a child that'd be great 😐

Thanks!
Disclaimer: I don't own VN Maker and have never used it, but it appears to support variables.

I think the best way to solve this is to use a variable. Every time the player makes the right choice, increase the value of your variable by 1.

Since you know exactly how many choices there were, you can simply check if your variable has reached a certain value. For 21 questions, your variable would need to be 11 or higher (10 is less than 50%).

If you're still developing your game and don't know how many choices there will be, I recommend using a second variable for the total number of answers given, which you'll increase every time the player has made a choice, regardless of whether it was correct or not. Then, all you need to do is to divide the number of right choices with the number of total choices. If the result is 0.5 or greater, then you've got more than 50% correct. For example: 10 / 21 = 0.476 (that's 47.6%) and 11 / 21 = 0.524 (52.4%). You'll need a Decimal Variable command for that calculation.

Using that second variable will allow you to add or remove choices without needing to update your ending selection logic. This also means you're less likely to have a bug, if you forget to update that logic. For example, you've designed 40 questions and therefore require 21 to be answered correctly. Then you decide that 40 questions are too many, and reduce them to 20. If you forget to update the requirement for the good ending, your players will be unable to reach it, even if they answer all questions correctly (because there are only 20 questions left, but you require 21 correct answers).
Just use a variable. Every time the player chooses the right answer, you add one to the variable. At the end of the game, see if the variable is >= 11.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-percentage-of-correct-and-wrong-choices.148413/