Diff for /loncom/homework/templates/SimpleFormula.problem between versions 1.1 and 1.2

version 1.1, 2002/06/06 08:56:43 version 1.2, 2003/07/29 00:51:17
Line 1 Line 1
 <problem>  <problem>
 <script type="loncapa/perl"># Enter computations here  <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 id="11" samples="y@-5:5#10" answer="$x">
       <responseparam decription="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" />
       <textline size="25" />    
   </formularesponse>
   
   </problem>
   
 </script>  
 <startouttext />Enter Question Text Here.  <endouttext />  
 <formularesponse answer="$answer" id="11" samples="">  
     <responseparam name="tol" type="tolerance" description="Numerical Tolerance" default=".0001" />  
     <textline size="50" />  
     <hintgroup>  
     </hintgroup>  
 </formularesponse>  
   
 </problem>  

Removed from v.1.1  
changed lines
  Added in v.1.2


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