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

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

Mon May 8 17:05:32 2006 UTC (7 years ago) by jjholt
File size: 1148 byte(s)
```Added tags.
```

```    1 ##DESCRIPTION
2 ##   Algebra: Lines
3 ##ENDDESCRIPTION
4
5 ##KEYWORDS('Algebra', 'Lines')
6 ##Tagged by up2p
7
8 ##DBsubject('Algebra')
9 ##DBchapter('Coordinates and Graphs')
10 ##DBsection('Lines')
11 ##Date('')
12 ##Author('')
13 ##Institution('Rochester')
14 ##TitleText1('')
15 ##EditionText1('')
16 ##AuthorText1('')
17 ##Section1('')
18 ##Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl"
28 );
29
30 TEXT(beginproblem());
32
33 \$x1 = random(2,5,1);
34 \$y1 = random(1,10,1);
35 \$x2 = random(6,10,1);
36 \$y2 = random(1,10,1);
37 while (\$y1==\$y2) {\$y2  = random(1,10,1)}
38
39 \$m1 = (\$y2-\$y1)/(\$x2-\$x1);
40
41 TEXT(EV2(<<EOT));
42 The equation of the line that goes through the points
43 \( ( \$x1 ,\$y1 ) \) and \( ( \$x2 ,\$y2 ) \) can be written in the form
44 \( y = mx+b \) where \( m \)
45 is: \{ans_rule(15) \}
46 \$BR
47 EOT
48
49 \$ans = \$m1;
50 ANS(num_cmp(\$ans));
51
52 TEXT(EV2(<<EOT));
53 and  where \( b \) is: \{ans_rule(15) \}
54 \$BR
55 EOT
56
57 \$ans = \$y1 -\$m1*\$x1;
58 ANS(num_cmp(\$ans));
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.
```