I am trying out using Math Quill for entering answers this semester for the first time. Our problems involving the contextScientificNotation.pl are giving errors. I'm including a picture of the error and the problem code at the end of this note. Perhaps I'm just not using Math Quill correctly? I typed the answer in with the small x for the times.

--rac

-------Problem code---------

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(

"PGstandard.pl",

"MathObjects.pl",

"PGchoicemacros.pl",

"contextScientificNotation.pl",

"contextLimitedNumeric.pl"

);

TEXT(beginproblem());

######################################

# Setup

$num0 = random(1.1,9,0.001);

$exp0 = random(2,4,1);

$num[0] = $num0 * 10**$exp0;

$num1 = random(1.1,9,0.001);

$exp1 = random(-3,-1,1);

$num[1] = $num1 * 10**$exp1;

$num2 = random(-9.5,-1.5,0.001);

$exp2 = random(2,4,1);

$num[2] = $num2 * 10**$exp2;

$num3 = random(-9.5,-1.5,0.001);

$exp3 = 0;

$num[3] = $num3 * 10**$exp3;

Context("LimitedNumeric");

$dec[0] = Compute("$num[0]")->reduce;

$dec[1] = Compute("$num[1]")->reduce;

$dec[2] = Compute("$num[2]")->reduce;

$dec[3] = Compute("$num[3]")->reduce;

Context("ScientificNotation");

$sn[0] = ScientificNotation($num[0]);

$sn[1] = ScientificNotation($num[1]);

$sn[2] = ScientificNotation($num[2]);

$sn[3] = ScientificNotation($num[3]);

($a,$b) = NchooseK(4,2);

######################################

# Main text

Context()->texStrings;

BEGIN_TEXT

Convert:

$PAR

a) Write in decimal form: \( $sn[$a] \) = \{ ans_rule(10) \}

$PAR

b) Write in scientific notation: \( $dec[$b]\) = \{ ans_rule(10) \}

END_TEXT

Context()->normalStrings;

######################################

# Answers

$ans_a = $dec[$a];

ANS($ans_a->cmp);

$ans_b = $sn[$b];

ANS($ans_b->cmp);

$showPartialCorrectAnswers = 1;

######################################

# Solutions

Context()->texStrings;

BEGIN_SOLUTION

$PAR Solution: $BR $BR

a) Write in decimal form: \( $sn[$a] \) = \( $dec[$a] \)

$PAR

b) Write in scientific notation: \( $dec[$b]\) = \( $sn[$b] \)

$BR

END_SOLUTION

Context()->normalStrings;

ENDDOCUMENT();