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