DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGML.pl", "parserMultiAnswer.pl", "parserRadioButtons.pl", "PGcourse.pl" ); TEXT(beginproblem()); $a = random(0, 10); $radio = RadioButtons([['Part 1', 'Part 2', 'Part 3']], 0, labels => "ABC"); $b = random(11, 20); $ma = MultiAnswer($a, $radio, $b)->with( checker => sub { my ($correct, $student, $self, $ans) = @_; my @ret = (0) x 3; for (0 .. $#$correct) { $ret[$_] = 1 if $correct->[$_] == $student->[$_]; } return @ret; } ); BEGIN_PGML The first answer is [`[$a]`]. [_____]{$ma} The second answer is part 1. [_____]{$ma} The third answer is [`[$b]`]. [_____]{$ma} END_PGML ENDDOCUMENT();