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, 1 month 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

    1: <problem>
    2: <script type="loncapa/perl">
    3: $mean=&random(4,9,0.1);
    4: @args=$mean;
    5: $answer="$mean,$mean,$mean would be a simple example";
    6: </script>
    7: 
    8: <startouttext />
    9: Provide a list of 3 numbers (separated by commas) that has a mean value of $mean.
   10: <endouttext />
   11: 
   12: <mathresponse answerdisplay="$answer" cas="R" args="@args">
   13: 
   14: <answer>x<-c(RESPONSE[1],RESPONSE[2],RESPONSE[3]);
   15: abs(mean(x)-LONCAPALIST[1])<0.001
   16: </answer>
   17: 
   18: <textline readonly="no" size="50" />
   19: </mathresponse>
   20: </problem>

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