File:  [LON-CAPA] / loncom / homework / templates / SimpleFormula.problem
Revision 1.3: download - view: text, annotated - select for diffs
Thu Jun 10 22:17:59 2004 UTC (20 years ago) by albertel
Branches: MAIN
CVS tags: version_1_1_99_4, version_1_1_99_3, version_1_1_99_2, version_1_1_99_1, HEAD
- removing the id="11" (BUG#3074)

<problem>
<script type="loncapa/perl">$z=&random(1,10,1);
$constant=&random(1,10,1);
# y=x+z-constant, solving for x, x=y-z+constant, prettyconstant is for simplifying
$prettyconstant=$constant-$z;
$x="y+$prettyconstant";
# code below substitutes '+-' and '-+' for '-'.  This is used in display of answer
$x=~s/\+-/-/g;
$x=~s/-\+/-/g;</script>

<startouttext />If z=$z and y=x+z-$constant, what does x equal?  
<endouttext />

<formularesponse samples="y@-5:5#10" answer="$x">
    <responseparam decription="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" />
    <textline size="25" />    
</formularesponse>

</problem>


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