Annotation of loncom/homework/templates/SimpleMathResponse.problem, revision 1.1

1.1     ! www         1: <problem>
        !             2: <script type="loncapa/perl">
        !             3: $x = &random(-1,1,2) * &random(1,5,1);
        !             4: $y = &random(-1,1,2) * &random(1,3,1);
        !             5: @args = ($x, $y);
        !             6: $yaa = $y-3*$x;
        !             7: if ($yaa > 0) {
        !             8:   $yaa = "+" . $yaa;
        !             9: } elsif ($yaa == 0) {
        !            10:   $yaa = "";
        !            11: }
        !            12: $example = "3x$yaa is an example for a function having constant slope which passes through the point ($x | $y). The slope is not given explicitely, so there are different possibilities for this function.";
        !            13: </script>
        !            14: 
        !            15: <startouttext />
        !            16: State a function y(x) with constant slope which passes through the point ($x | $y).<br />
        !            17: <br />
        !            18: y(x) =
        !            19: <endouttext />
        !            20: 
        !            21: <mathresponse answerdisplay="$example" cas="maxima" args="@args">
        !            22: 
        !            23: <answer>
        !            24: y(x):=RESPONSE[1];
        !            25: hitspoint:is(abs(y(LONCAPALIST[1]) - LONCAPALIST[2]) <= 0.000000001);
        !            26: islinear:is(diff(y(x),x,2) = 0);
        !            27: hitspoint and islinear;
        !            28: </answer>
        !            29: 
        !            30: <textline readonly="no" size="50" />
        !            31: </mathresponse>
        !            32: 
        !            33: </problem>
        !            34: 

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