check_modules.pl says everything is found and loaded.
I included two different problems here, still being randomized using the code we had in my example above. This first one is NOT working:
I included two different problems here, still being randomized using the code we had in my example above. This first one is NOT working:
DOCUMENT();
# Load whatever macros you need for the problem
loadMacros("PGstandard.pl",
"MathObjects.pl",
);
## Do NOT show partial correct answers
$showPartialCorrectAnswers = 0;
TEXT(beginproblem());
$A = random(1,9,1);
BEGIN_TEXT
Bestäm derivatan till funktionen \(f(x) = \ln(x^2+${A}) \)
$PAR$PAR
\( f'(x) = \) \{ans_rule(20) \}
$PAR
END_TEXT
$ans = Compute("2*x/(x**2+${A})");
ANS($ans->cmp);
ENDDOCUMENT();
And this second one is working just fine:
DOCUMENT();
# Load whatever macros you need for the problem
loadMacros("PGstandard.pl",
"MathObjects.pl",
);
##
Do NOT show partial correct answers
$showPartialCorrectAnswers = 0;
TEXT(beginproblem());
$A = random(2,5,1);
$B = random(1,5,1);
BEGIN_TEXT
Bestäm derivatan till funktionen \(f(x) = \sin(${A} x-${B}) \)
$PAR$PAR
\(
f'(x) = \) \{ans_rule(20) \}
$PAR
END_TEXT
$ans = Compute("${A}*cos(${A}*x-${B})");
ANS($ans->cmp);
ENDDOCUMENT();