Parent Directory
|
Revision Log
Updated tags.
1 ## DESCRIPTION 2 ## Scale a Vector 3 ## ENDDESCRIPTION 4 5 ## KEYWORDS('Scale', 'Unit', 'Vector') 6 ## Tagged by nhamblet 7 8 ## DBsubject('Calculus') 9 ## DBchapter('Vectors and the Geometry of Space') 10 ## DBsection('Vectors') 11 ## Date('5/31/2000') 12 ## Author('Joseph Neisendorfer') 13 ## Institution('Rochester') 14 ## TitleText1('') 15 ## EditionText1('') 16 ## AuthorText1('') 17 ## Section1('') 18 ## Problem1('') 19 20 DOCUMENT(); 21 22 loadMacros( 23 "PG.pl", 24 "PGbasicmacros.pl", 25 "PGchoicemacros.pl", 26 "PGanswermacros.pl", 27 "PGauxiliaryFunctions.pl" 28 ); 29 30 TEXT(beginproblem()); 31 $showPartialCorrectAnswers = 1; 32 33 $a = non_zero_random(-10, 10); 34 $b = random(-10, 10); 35 $c = random(-10, 10); 36 37 $dist = sqrt(($a)**2 + ($b)**2 + ($c)**2); 38 39 BEGIN_TEXT 40 $PAR 41 Find a unit vector in the same direction as \( {\mathbf a} \) = ($a, $b, $c). 42 $PAR 43 (\{ ans_rule(40) \}, 44 END_TEXT 45 ANS(num_cmp($a/$dist)); 46 47 BEGIN_TEXT 48 \{ ans_rule(40) \}, 49 END_TEXT 50 ANS(num_cmp($b/$dist)); 51 52 BEGIN_TEXT 53 \{ ans_rule(40) \}) 54 END_TEXT 55 ANS(num_cmp($c/$dist)); 56 57 ENDDOCUMENT();
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |