[LON-CAPA-users] Script library example
Felicia Berryman
lon-capa-users@mail.lon-capa.org
Thu, 01 Jun 2006 12:18:00 -0400
Hi Robert,
It should be in the example problem I gave you in your ticket. I pasted
it below:
<problem>
<import>rb.library</import>
<script type="loncapa/perl">$var1=&random(1,10,1);
$var2=&random(1,10,1);
$wackyanswer=&wacky($var1,$var2);</script>
<startouttext />What is the wacky answer if your first number is $var1
and your second number is $var2?<endouttext />
<numericalresponse answer="$wackyanswer">
<responseparam name="tol" default="2%" type="tolerance"
description="Numerical Tolerance" />
<responseparam name="sig" type="int_range,0-16" default="0,15"
description="Significant Figures" />
<textline readonly="no" />
<hintgroup showoncorrect="no">
<startouttext /><endouttext />
</hintgroup>
</numericalresponse>
</problem>
Felicia
--
Felicia Berryman
LON-CAPA Support Coordinator
Michigan State University
Phone: (517)432-9866
Technical Support Available at:
http://www.loncapa.msu.edu - MSU Users
http://www.help.lon-capa.org - General