What I am thinking of is a list of example problems that illustrate how to set up problems that need the different kinds of answers inputted, or need a particular kind of set up (random integers from a particular set, for example).

I know the art of problem writing cleverly combines several aspects of problem writing together (for example writing code to generate the Cartesian product of two sets, which becomes the answer), but what I am imagining are stripped down, bare bones examples of problems, so that a beginner like me could download the sample problem and modify it by changing some obvious lines of code.

As an example of what I am thinking of, in my previous post I asked how could I set things up so that students would have to input a list of ordered pairs, with letters as entries, as the answer.

Davide Cervone kindly answered and posted the code that I was able to incorporate into my problem to get it to work (below I changed Davide's code slightly to fit the way I usually set up answers, but his code would have worked as well, and is neater).

So taking this as an example, what I am envisioning is that on this sample problem library page with the most basic of code there would be a line with a link that contains text something like

"A problem with a list of ordered pairs, with letters as entries, as the answer", and when you click on the link it brings up a .pg file with code something like this:

# some lines of information about the author/source of the example problem

DOCUMENT(); # This should be the first executable line in the problem.

# load some standard macros

loadMacros(

"PG.pl",

"PGbasicmacros.pl",

"PGchoicemacros.pl",

"PGanswermacros.pl",

"PGauxiliaryFunctions.pl",

"extraAnswerEvaluators.pl",

"MathObjects.pl"

);

#install_problem_grader(~~&std_problem_grader);

TEXT(beginproblem());

#$showPartialCorrectAnswers = 1;

#$showPartialCredit = 1;

Context("Numeric");

Context()->strings->are(

B => {caseSensitive=>1},

E => {caseSensitive=>1},

F => {caseSensitive=>1},

H => {caseSensitive=>1},

);

BEGIN_TEXT

# Some example of a very basic illustrative problem.

\(S = \lbrace (B,E),(B,F),(B,H) \rbrace \).

$BR

List the elements of \(S\).$BR

\(S=\lbrace \)\{ans_rule(15)\}\(\rbrace \).

END_TEXT

ANS(Compute("(B,E),(B,F),(B,H)")->cmp);

ENDDOCUMENT(); # This should be the last executable line in the problem.

This may sound trivial to experienced problem writers, but such a library would be a fantastic help to novices like myself.

If there is such a library and I have not found it yet, my apologies to its creator and its contributors.