[LON-CAPA-users] Understanding formularesponses

Justin Gray lon-capa-users@mail.lon-capa.org
Mon, 8 Sep 2008 00:20:44 -0800


------=_Part_62514_32440029.1220862044332
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Ray,

If you want to allow a numerical approximation to log(2) as a correct
answer, then I recommend that you use point sampling rather than a computer
algebra system to evaluate the answer. Try this:

<problem>
<part><startouttext />Numerical Tolerance works well with formula response
when point sampling is used. Either log(2) or 0.6931 are graded
correct:<endouttext />

<formularesponse answer="log(2)" samples="x@1:5#4">
    <responseparam description="Numerical Tolerance" type="tolerance"
default="0.0001" name="tol" />
    <textline size="25" readonly="no" />

</formularesponse>
</part>

<part><startouttext />Numerical Tolerance does not seem to work well with
formula response when the expression is evaluated in Maxima. This time
log(2) is correct but 0.6931 is graded as incorrect:<endouttext />
<formularesponse answer="log(2)">
    <responseparam description="Numerical Tolerance" type="tolerance"
default="0.0001" name="tol" />
    <textline size="25" readonly="no" />

</formularesponse>
</part>
</problem>

Justin


On Sun, Sep 7, 2008 at 11:36 PM, Ray Batchelor <batchelo@sfu.ca> wrote:

>
> How would you create a formula response question for which you want both
> "log(2)" to be the answer both symbolically and numerically?
>
> --
> Ray
>
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Justin Gray
Dept. of Mathematics
Simon Fraser University
8888 University Drive
Burnaby, B.C. V5A 1S6
Canada
Tel. +1 778-782-4237
Fax. +1 778-782-4947
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://www.terryfoxrun.org/ENRunner/default.asp?s=1&RunnerID=56229

------=_Part_62514_32440029.1220862044332
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Hi Ray,<br><br>If you want to allow a numerical approximation to log(2) as a correct answer, then I recommend that you use point sampling rather than a computer algebra system to evaluate the answer. Try this:<br>
<br>&lt;problem&gt;<br>&lt;part&gt;&lt;startouttext /&gt;Numerical Tolerance works well with formula response when point sampling is used. Either log(2) or 0.6931 are graded correct:&lt;endouttext /&gt;<br><br>&lt;formularesponse answer=&quot;log(2)&quot; samples=&quot;x@1:5#4&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;responseparam description=&quot;Numerical Tolerance&quot; type=&quot;tolerance&quot; default=&quot;0.0001&quot; name=&quot;tol&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;textline size=&quot;25&quot; readonly=&quot;no&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; <br>
&lt;/formularesponse&gt;<br>&lt;/part&gt;<br><br>&lt;part&gt;&lt;startouttext /&gt;Numerical Tolerance does not seem to work well with formula response when the expression is evaluated in Maxima. This time log(2) is correct but 0.6931 is graded as incorrect:&lt;endouttext /&gt;<br>
&lt;formularesponse answer=&quot;log(2)&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;responseparam description=&quot;Numerical Tolerance&quot; type=&quot;tolerance&quot; default=&quot;0.0001&quot; name=&quot;tol&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;textline size=&quot;25&quot; readonly=&quot;no&quot; /&gt;<br>
&nbsp;&nbsp;&nbsp; <br>&lt;/formularesponse&gt;<br>&lt;/part&gt;<br>&lt;/problem&gt;<br><br>Justin<br><br><br><div class="gmail_quote">On Sun, Sep 7, 2008 at 11:36 PM, Ray Batchelor <span dir="ltr">&lt;<a href="mailto:batchelo@sfu.ca">batchelo@sfu.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>How would you create a formula response question for which you want both<br>
&quot;log(2)&quot; to be the answer both symbolically and numerically?<br clear="all"><br>-- <br>Ray<br><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Justin Gray &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>Dept. of Mathematics &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
Simon Fraser University<br>8888 University Drive<br>Burnaby, B.C. V5A 1S6<br>Canada<br>Tel. +1 778-782-4237<br>Fax. +1 778-782-4947<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br><a href="http://www.terryfoxrun.org/ENRunner/default.asp?s=1&amp;RunnerID=56229">http://www.terryfoxrun.org/ENRunner/default.asp?s=1&amp;RunnerID=56229</a> <br>
<br><br><br>
</div>

------=_Part_62514_32440029.1220862044332--