File:  [LON-CAPA] / loncom / homework / templates / HintFormula.problem
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jan 22 21:48:55 2007 UTC (17 years, 6 months ago) by www
Branches: MAIN
CVS tags: HEAD
* Templates for formula and mathresponse
* Adding documentation to the manual
* stringresponse, etc, are not a subsubsection of "Foils" in author manual

    1: <problem>
    2: <script type="loncapa/perl">
    3: $a1=&random(3,6,1);
    4: $e1=&random(3,6,1);
    5: $a2=&random(6,8,1);
    6: $e2=&random(6,8,1);
    7: $da1=$a1*$e1;
    8: $da2=$a2*$e2;
    9: $de1=$e1-1;
   10: $de2=$e2-1;
   11: @derivative=($da1.'t^'.$de1,$da2.'t^'.$de2);
   12: @wrongderivative=($a1.'t^'.$de1,$a2.'t^'.$de2);
   13: </script>
   14: <startouttext />What is the derivative of
   15: <m eval="on">\[\left(\begin{array}{c}$a1 t^$e1\\ $a2 t^$e2\end{array}\right)\]</m>
   16: with respect to <m>$t$</m>?<endouttext />
   17: <formularesponse answer="@derivative">
   18: <textline readonly="no" size="25" />
   19: <hintgroup showoncorrect="no">
   20: <formulahint answer="@wrongderivative" name="nomulti"></formulahint>
   21: <hintpart on="nomulti">
   22: <startouttext />You need to multiply with the original exponent.<endouttext />
   23: </hintpart>
   24: </hintgroup>
   25: </formularesponse>
   26: </problem>

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