[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra14Lines / lh2-1_9.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setAlgebra14Lines/lh2-1_9.pg

Mon May 8 17:05:32 2006 UTC (7 years ago) by jjholt
File size: 1291 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 "PGgraphmacros.pl",
30
31 );
32
33 TEXT(beginproblem());
35
36 \$x1 = non_zero_random(-5,6,1);
37 \$y1 = non_zero_random(-5,6,1);
38
39 \$graph = init_graph(-10,-10,10,10,'axes'=>[0,0],'grid'=>[20,20],'size'=>[200,200]);
40 \$aline = FEQ("(-\$y1/\$x1)*x+\$y1 for x in <-10,10> using color:green and weight:2");
41
42 plot_functions(\$graph,\$aline);
43
44 BEGIN_TEXT
45
46 Find an equation \(y=mx+b\) for the line whose graph is sketched
47 \$BR\$BR \{ image(insertGraph(\$graph), width=>200, height=>200) \}
48 \$BR\$BR
49 The slope \(m\) equals  \{ans_rule(10)\}.
50 \$BR
51 The \(y\)-intercept \(b\) equals  \{ans_rule(10)\}.
52 END_TEXT
53
54 \$ans1 = -\$y1/\$x1;
55 \$ans2 = \$y1;
56
57 ANS(num_cmp(\$ans1));
58 ANS(num_cmp(\$ans2));
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.
```