Parent Directory
|
Revision Log
Revision 1299 - (view) (download)
| 1 : | jj | 145 | ##DESCRIPTION |
| 2 : | jjholt | 202 | ## Algebra: Lines |
| 3 : | jj | 145 | ##ENDDESCRIPTION |
| 4 : | |||
| 5 : | jjholt | 202 | ##KEYWORDS('Algebra', 'Lines') |
| 6 : | ##Tagged by up2p | ||
| 7 : | jj | 145 | |
| 8 : | jjholt | 202 | ##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 : | jj | 145 | DOCUMENT(); # This should be the first executable line in the problem. |
| 21 : | |||
| 22 : | loadMacros( | ||
| 23 : | "PG.pl", | ||
| 24 : | "PGbasicmacros.pl", | ||
| 25 : | "PGchoicemacros.pl", | ||
| 26 : | "PGanswermacros.pl", | ||
| 27 : | "PGauxiliaryFunctions.pl", | ||
| 28 : | "PGgraphmacros.pl", | ||
| 29 : | gage | 1299 | "extraAnswerEvaluators.pl", |
| 30 : | "PGcourse.pl" | ||
| 31 : | jj | 145 | |
| 32 : | ); | ||
| 33 : | |||
| 34 : | TEXT(beginproblem()); | ||
| 35 : | $showPartialCorrectAnswers = 1; | ||
| 36 : | |||
| 37 : | $x1 = non_zero_random(-6,6,1); | ||
| 38 : | $y1 = non_zero_random(-6,6,1); | ||
| 39 : | |||
| 40 : | $graph = init_graph(-10,-10,10,10,'axes'=>[0,0],'grid'=>[20,20],'size'=>[200,200]); | ||
| 41 : | $aline = FEQ("(-$y1/$x1)*x+$y1 for x in <-10,10> using color:green and weight:2"); | ||
| 42 : | |||
| 43 : | plot_functions($graph,$aline); | ||
| 44 : | |||
| 45 : | BEGIN_TEXT | ||
| 46 : | |||
| 47 : | Find an equation \(y=mx+b\) for the line whose graph is sketched | ||
| 48 : | $BR $BR | ||
| 49 : | \{ image(insertGraph($graph), width=>200, height=>200) \} | ||
| 50 : | $BR$BR | ||
| 51 : | The slope \(m\) equals \{ans_rule(10)\}. | ||
| 52 : | $BR | ||
| 53 : | The \(y\)-intercept \(b\) equals \{ans_rule(10)\}. | ||
| 54 : | END_TEXT | ||
| 55 : | |||
| 56 : | $ans1 = -$y1/$x1; | ||
| 57 : | $ans2 = $y1; | ||
| 58 : | |||
| 59 : | ANS(num_cmp($ans1)); | ||
| 60 : | ANS(num_cmp($ans2)); | ||
| 61 : | |||
| 62 : | ENDDOCUMENT(); # This should be the last executable line in the problem. |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |