---
metadata:
    display_name: Formula Repsonse
data: |
 <problem>
 <text>
   <h2>Example: Formula Response Problem</h2>
   
   <p>
     A formula response problem accepts a line of text input from the
     student, and evaluates the input for correctness based on numerical sampling of 
     the symbolic formula which is given.
   </p>
   
   <p>
     The answer is correct if it is within a specified numerical tolerance
     of the expected answer.
   </p>
   
   <p>This kind of response checking can handle symbolic expressions, but places an extra burden
     on the problem author to specify the allowed variables in the expression, and the
     numerical ranges over which the variables must be sampled to test for correctness.</p>
   
   <script type="loncapa/python">I = "m*c^2"</script>
   
   <text>
     <br/>
     Give an equation for the relativistic energy of an object with mass m.  Explicitly indicate multiplication with a <tt>*</tt> symbol.<br/>
   </text>
   <formularesponse type="cs" samples="m,c@1,2:3,4#10" answer="$I">
         <responseparam description="Numerical Tolerance" type="tolerance"
      default="0.00001" name="tol" /> 
         <br/><text>E =</text> <textline size="40" math="1" />    
          </formularesponse>
   
 </text>
 </problem>
children: []
