Random math question minigame script

Yo,

I'm thinking of asking the player to answer simple math questions as part of a quiz but because it's a repeat event I don't want them to be the same every time. I can make a random function with like 20 questions and answers but I was wondering if anyone has a program that actually comes up with questions. Like it should be possible to code a function that creates a math question within set parameters and gives an answer to check against, I just don't know how to do it.

Alternatively if anyone has made a math question randomiser they're ok with me copying I'd appreciate not having to do the work.

Love y'all
It's actually pretty simple to do, just use variables.
1. Message: "\V[A] + \V[ B] = ?"
2. Show Choices:
choice #1: \V[C]
choice #1: \V[D]
choice #1: \V[E]
3. Variable: \V[result] set to \V[A]
4. Variable: \V[result] add \V
So now we know what is the result ( A+B ).
5. For every choice, set the same variable, let's call it "answer" to the variable of choice (C,D,E).
6. After that make conditional branch and check is variable "answer" = "result", if no, then let the player know this is wrong answer.
The only things that needs to be done is regrouping the answers, because it'll be stupid if always answer 1 is the right one.

Original thread: https://forums.rpgmakerweb.com/threads/random-math-question-minigame-script.155745/