[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra03Expressions / lhp3_26.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setAlgebra03Expressions/lhp3_26.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 145 - (download) (annotate)
Sun Mar 26 22:21:31 2006 UTC (7 years, 1 month ago) by jj
File size: 755 byte(s)
Initial import

    1 ##DESCRIPTION
    2 ##  lhp3_26.pg.
    3 ##ENDDESCRIPTION
    4 
    5 ##KEYWORDS('algebra, polynomial operations')
    6 
    7 DOCUMENT();
    8 loadMacros("PGbasicmacros.pl",
    9            "PGchoicemacros.pl",
   10            "PGanswermacros.pl",
   11            "PGauxiliaryFunctions.pl"
   12 );
   13 
   14 TEXT(beginproblem());
   15 $showPartialCorrectAnswers = 1;
   16 
   17 $a1=random(2,5,1);
   18 $a2=random(2,10,1);
   19 $a3=random(2,10,1);
   20 $a4=random(2,10,1);
   21 $a5=random(2,10,1);
   22 $a6=random(2,10,1);
   23 $a7=random(2,10,1);
   24 BEGIN_TEXT
   25 
   26 The expression \($a1 ($a2 x^2 -$a3 x+$a4)-($a5 x^2+$a6 x-$a7)\) equals $BR
   27 \{ans_rule(5) \}\( x^2 +\)\{ans_rule(5) \} \(x+\)\{ans_rule(5) \}
   28 $BR
   29 END_TEXT
   30 
   31 $ans1 = $a1*$a2-$a5;
   32 $ans2 = -$a1*$a3-$a6;
   33 $ans3 = $a1*$a4+$a7;
   34 
   35 ANS(num_cmp([$ans1,$ans2,$ans3], relTol=>.01));
   36 ENDDOCUMENT();

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9