[LON-CAPA-cvs] cvs: loncom /homework/templates Plot_curve.problem
www
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 29 Oct 2007 16:13:18 -0000
www Mon Oct 29 12:13:18 2007 EDT
Modified files:
/loncom/homework/templates Plot_curve.problem
Log:
People did not understand the other template
Index: loncom/homework/templates/Plot_curve.problem
diff -u loncom/homework/templates/Plot_curve.problem:1.4 loncom/homework/templates/Plot_curve.problem:1.5
--- loncom/homework/templates/Plot_curve.problem:1.4 Mon Jul 30 17:52:21 2007
+++ loncom/homework/templates/Plot_curve.problem Mon Oct 29 12:13:10 2007
@@ -1,7 +1,9 @@
<problem>
<script type="loncapa/perl">
-# Enter computations here
+$amplitude=&random(0.5,3.5,0.5);
+$omega=&random(1,2,0.5);
+$function="$amplitude*sin($omega*x)";
</script>
<gnuplot width="300" transparent="off" samples="100" grid="on" font="9" bgcolor="xffffff" height="300" align="left" fgcolor="x000000" border="on" plottype="Cartesian" >
@@ -9,19 +11,16 @@
<xlabel>Label X</xlabel>
<ylabel>Label Y</ylabel>
<curve linestyle="linespoints" name="My Plot" pointtype="0" color="x000000">
- <function>sin(x)</function>
+ <function>$function</function>
</curve>
</gnuplot>
-<startouttext />Enter Question Text Here.<endouttext />
+<startouttext />What is the amplitude of this function?<endouttext />
-<numericalresponse answer="">
+<numericalresponse answer="$amplitude" format="2s">
<responseparam name="tol" type="tolerance" description="Numerical Tolerance" default="5%" />
- <responseparam name="sig" type="int_range,0-16" description="Significant Figures" default="0,15" />
- <textline />
-<hintgroup>
-<startouttext /><endouttext />
-</hintgroup>
+
+ <textline readonly="no" />
+
</numericalresponse>
</problem>
-