File:  [LON-CAPA] / loncom / homework / templates / SimpleMathResponseR.problem
Revision 1.1: download - view: text, annotated - select for diffs
Sat Apr 18 23:43:54 2009 UTC (15 years ago) by www
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_1, version_2_9_0, version_2_8_99_1, version_2_8_99_0, bz5969, HEAD, GCI_2, BZ5971-printing-apage, BZ5434-fox
* Some more blacklisted stuff
* Eliminate debugging code
* Templates for using R

<problem>
<script type="loncapa/perl">
$mean=&random(4,9,0.1);
@args=$mean;
$answer="$mean,$mean,$mean would be a simple example";
</script>

<startouttext />
Provide a list of 3 numbers (separated by commas) that has a mean value of $mean.
<endouttext />

<mathresponse answerdisplay="$answer" cas="R" args="@args">

<answer>x<-c(RESPONSE[1],RESPONSE[2],RESPONSE[3]);
abs(mean(x)-LONCAPALIST[1])<0.001
</answer>

<textline readonly="no" size="50" />
</mathresponse>
</problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>