[rochester] / trunk / rochester_problib / setAlgebra10QuadraticEqns / sw3_3_3.pg Repository:
ViewVC logotype

View of /trunk/rochester_problib/setAlgebra10QuadraticEqns/sw3_3_3.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 341 - (download) (annotate)
Fri Mar 21 21:03:25 2003 UTC (10 years, 3 months ago) by apizer
File size: 815 byte(s)
new files

    1 ##DESCRIPTION
    2 ##  Algebra problem: quadratic equation
    3 ##ENDDESCRIPTION
    4 
    5 ##KEYWORDS('algebra', 'quadratic equations')
    6 
    7 DOCUMENT();        # This should be the first executable line in the problem.
    8 
    9 loadMacros(
   10 "PG.pl",
   11 "PGbasicmacros.pl",
   12 "PGchoicemacros.pl",
   13 "PGanswermacros.pl",
   14 "PGauxiliaryFunctions.pl"
   15 );
   16 
   17 TEXT(&beginproblem);
   18 $showPartialCorrectAnswers = 1;
   19 
   20 $x1 = -random(4,8,1);
   21 $x2 = -random(1,4,1);
   22 
   23 # (x+x1)(x+x2)=0
   24 $b = $x1+$x2;
   25 $c = $x1*$x2;
   26 
   27 TEXT(EV2(<<EOT));
   28 Solve the equation \(x^2 ? {$b} x ? {$c}=0\) by factoring.
   29 $BR $BR
   30 The solutions are \( x_1 = \) \{ans_rule(15) \}
   31 and \( x_2 = \) \{ans_rule(15) \} with \(x_1\le x_2\).
   32 $BR
   33 EOT
   34 
   35 $ans1 = -$x2;
   36 $ans2 = -$x1;
   37 &ANS(std_num_cmp($ans1));
   38 &ANS(std_num_cmp($ans2));
   39 
   40 ENDDOCUMENT();        # This should be the last executable line in the problem.
   41 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9