[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra14Lines / sw2_4_23.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setAlgebra14Lines/sw2_4_23.pg

Thu Aug 16 23:07:34 2007 UTC (5 years, 9 months ago) by jj
File size: 1146 byte(s)
```Moved problems back into place in the Rochester library, and set up
redirect files from their former locations.
```

```    1 ##DESCRIPTION
2 ##  find the equation of the line given two points on the line
3 ##ENDDESCRIPTION
4
5 ##KEYWORDS('algebra', 'lines')
6 ## pphi tagged and PAID on 12-12-2003
7
8 ## DBsubject('Algebra')
9 ## DBchapter('Coordinates and Graphs')
10 ## DBsection('Lines')
11 ## Date('6/3/2002')
12 ## Author('')
13 ## Institution('')
14 ## TitleText1('College Algebra')
15 ## EditionText1('3')
16 ## AuthorText1('Stewart, Redlin, Watson')
17 ## Section1('2.4')
18 ## Problem1('23')
19 DOCUMENT();        # This should be the first executable line in the problem.
20
22 "PG.pl",
23 "PGbasicmacros.pl",
24 "PGchoicemacros.pl",
26 "PGauxiliaryFunctions.pl"
27 );
28
29 TEXT(beginproblem());
31
32 \$x1 = non_zero_random(-2,5,1);
33 \$y1 = non_zero_random(-5,6,1);
34
35 TEXT(EV2(<<EOT));
36 The equation of the line with \(x\)-intercept \(\$x1\) and
37 \(y\)-intercept \(\$y1\) can be written in the form \( y = mx+b \) where
38 \$BR
39 the number \( m \) is: \{ans_rule(10) \}
40 \$BR
41 the number \( b \) is: \{ans_rule(10) \}
42 EOT
43
44 \$ans1 = -\$y1/\$x1;
45 \$ans2 = \$y1;
46
47 ANS(num_cmp(\$ans1));
48 ANS(num_cmp(\$ans2));
49
50 ENDDOCUMENT();        # This should be the last executable line in the problem.
```