Compilation errorMissing right curly or square bracket at (eval 2449) line 44, at end of line
WeBWorK Warnings
WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.
Warning messages
Scalar found where operator expected at line 33 of (eval 2426), near "$BR"
(Might be a runaway multi-line ,, string starting on line 23)
(Missing operator before
$BR?)
Backslash found where operator expected at line 34 of (eval 2426), near "$BR
\"
(Missing semicolon on previous line?)
Backslash found where operator expected at line 34 of (eval 2426), near ") \"
(Missing operator before \?)
Backslash found where operator expected at line 34 of (eval 2426), near ")\"
(Missing operator before \?)
Processing of this PG problem was not completed. Probably because of a syntax error.
The translator died prematurely and no PG warning messages were transmitted. at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 700.
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGcourse.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
Context('Matrix');
Context()->variables->add(a => "Real");
Context()->variables->add(y => "Real");
$a = Real(non_zero_random(-9,9,1));
$b = Real(non_zero_random(-9,9,1));
$mm = Compute("1 - $b");
$nn = Compute("$b * (1 - $b)/$a");
$A = Matrix([
[ a, $a],
[ y, $b],
]);
Context()->texStrings;
BEGIN_TEXT
For the 2 x 2 matrix \($A\)
determine the values of \(a\) and \(b\) for which \(A^2=A\).
$BR$BR
\(a=\) \{ans_rule(10)\},
$BR
\(b=\) \{ans_rule(10)\}.
END_TEXT
Context()->normalStrings;
ANS( $mm->cmp );
ANS( $nn->cmp );
ENDDOCUMENT();