PREP 2015 Question Authoring - Archived

how to use ContextFraction properly?

Re: how to use ContextFraction properly?

by Davide Cervone -
Number of replies: 0
It looks like you really only need to prevent decimals from being entered, which does not actually require the Fraction context. You just need to turn on the "no-fraction" feature in the Point context:
The alternative would be to use the Fraction-NoDecimals context and enable points in that context:
Context()->parens->set("(" => {type=>"Point"});
Either approach works.

There are a couple of comments I'd make about other aspects of the problem. First, how are the students supposed to know to use the variables r and s in their answers? You should probably include that in your statement somewhere. Second you ask for a set, but your answer is a formula returning a point. It might be good for you to include the braces for the set around your answer blank, so that they are filling in its contents.

Here is one version of the central part of your problem with these rewrites:



$ans = Compute("($d/$a-$b r/$a-$c s/$a, r, s)");



Find the solution set of the following linear equation, using [`x_1`] and [`x_2`] as the
free variables [`r`] and [`s`].

    [``[$a] x_1+[$b]x_2+[$c]x_3 = [$d]``]

    [``S= \{``] [_________________]{$ans} [`\}`]