It is a rather common practice that teachers prepare multiple versions of a test for the same exam in order to reduce cheating. Can \LaTeX do this? I want to design a math test with a set of parameters that are randomly chosen from a given set to create problems that have same wording but different numbers (something that online homework systems do).
Is such a thing possible with any latex package? Is it possible at all?
A basic example is: Produce 10 pages, each a with a copy of the following question
What is the sum $p+q$?
Where the program chooses and inserts $p$ randomly from the range 20 to 30 and $q$ from 50 to 60.