Answers can be entered in any order into answer blanks
Download file: UnorderedAnswers.pg
DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'unorderedAnswer.pl', 'PGcourse.pl');
Preamble
The macro unorderedAnswer.pl
must be loaded.
Context()->variables->add(y => 'Real', z => 'Real'); $a = random(2, 9); $answer1 = Compute("x^$a"); $answer2 = Compute("y^$a"); $answer3 = Compute("z^$a");
Setup
Because the answers have the variables x, y, and z, add the latter two.
BEGIN_PGML Rewrite the following expression without parentheses. Simplify your answer as much as possible. [`(xyz)^{[$a]} =`] [_____] [`\cdot`] [_____] [`\cdot`] [_____] END_PGML
Statement
This is the problem statement in PGML.$showPartialCorrectAnswers = 0; UNORDERED_ANS($answer1->cmp, $answer2->cmp, $answer3->cmp);
Answer
We use UNORDERED_ANS(checker1, checker2, ...);
to evaluate the answers. It is possible to withhold feedback and credit until everything is correct by using the standard problem grader, which awards no partial credit and full credit only when everything is correct.
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.