Parent Directory
|
Revision Log
Revision 145 - (view) (download)
| 1 : | jj | 145 | ##DESCRIPTION |
| 2 : | ## Algebra problem: complex numbers | ||
| 3 : | ##ENDDESCRIPTION | ||
| 4 : | |||
| 5 : | ##KEYWORDS('algebra', 'complex number') | ||
| 6 : | |||
| 7 : | DOCUMENT(); # This should be the first executable line in the problem. | ||
| 8 : | |||
| 9 : | loadMacros( | ||
| 10 : | "PG.pl", | ||
| 11 : | "PGbasicmacros.pl", | ||
| 12 : | "PGchoicemacros.pl", | ||
| 13 : | "PGanswermacros.pl", | ||
| 14 : | "PGauxiliaryFunctions.pl" | ||
| 15 : | ); | ||
| 16 : | |||
| 17 : | TEXT(beginproblem()); | ||
| 18 : | $showPartialCorrectAnswers = 1; | ||
| 19 : | |||
| 20 : | $x1 = non_zero_random(-8,8,1); | ||
| 21 : | $y1 = non_zero_random(-8,8,1); | ||
| 22 : | $x2 = non_zero_random(-8,8,1); | ||
| 23 : | $y2 = non_zero_random(-8,8,1); | ||
| 24 : | |||
| 25 : | $a = $x1-$x2; | ||
| 26 : | $b = $y1-$y2; | ||
| 27 : | |||
| 28 : | TEXT(EV2(<<EOT)); | ||
| 29 : | Evaluate the expression \( ($x1 ? {$y1} i)-($x2 ? {$y2} i)\) and | ||
| 30 : | write the result in the form \(a+ b i\). | ||
| 31 : | $BR $BR | ||
| 32 : | The real number \(a\) equals \{ans_rule(15) \} | ||
| 33 : | $BR | ||
| 34 : | The real number \( b \) equals \{ans_rule(15) \} | ||
| 35 : | $BR | ||
| 36 : | EOT | ||
| 37 : | |||
| 38 : | $ans1 = $a; | ||
| 39 : | $ans2 = $b; | ||
| 40 : | ANS(num_cmp($ans1)); | ||
| 41 : | ANS(num_cmp($ans2)); | ||
| 42 : | |||
| 43 : | ENDDOCUMENT(); # This should be the last executable line in the problem. |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |