Can the units (with numbers) for a correct answer be displayed with the numeric value under the "Correct Answer"?
For the code below the student will see a green field for the correct answer when she enters the correct number with units, but there is no corresponding display of these units attached to the correct numeric value under the correct answer header. Can these units be included with the correct answer also?
Thanks.
# Webwork Workshop 2015 for Payer, Homework 19, Practice:
# Exercises for Definite Integral applications: pg413, #61.
DOCUMENT();
loadMacros("PGstandard.pl",
"MathObjects.pl",
"parserNumberWithUnits.pl",
"PGML.pl");
TEXT(beginproblem());
Context("Numeric");
$a =Real(random(0.5, 5,1));
$b =Real(random(0.1,0.6,0.1));
$c =Real(random(3,19,1));
$e = 0;
#$e =Real(random(0, 3,1));
$d =Real(random(4, 12,1));
$lo = Formula($b*$e**2+$c);
$up = Formula($b*$d**2+$c);
$ans =Formula("-$a/$b*(($up)**0.5-($lo)**0.5)");
$ans1 =Compute("$ans");
$ans2 =NumberWithUnits($ans1, "mg/cm^3");
BEGIN_PGML
The concentration of a drug in [`\frac{mg}{cm^3}`] within a patient's blood stream after an injection is decreasing at the rate of [`A'(t)`] where [`t`] is in hours. By how much does the concentration change over the first [`[$d]`] hours?
*NOTE!* Include the correct *units* within your answer.
[``A'(t) = \frac{-[$a] t}{\sqrt{[$b]t^2+[$c]}} ``]
[______________]{$ans2}
END_PGML
BEGIN_PGML_SOLUTION
*SOLUTION*
END_PGML_SOLUTION
ENDDOCUMENT();