|
| 1 | +## BEGIN_DESCRIPTION |
| 2 | +## Convert from degrees to radians (5 conversions) |
| 3 | +## END_DESCRIPTION |
| 4 | +## |
| 5 | +############################################## |
| 6 | +## DBsubject(Trigonometry) |
| 7 | +## DBchapter(Geometric and algebraic foundations for trigonometry) |
| 8 | +## DBsection(Radians, converting radians & degrees) |
| 9 | +## Institution(METU-NCC) |
| 10 | +## Author(Benjamin Walter) |
| 11 | +## MO(1) |
| 12 | +## Static(0) |
| 13 | +## Level(2) |
| 14 | +## Language(en) |
| 15 | +############################################### |
| 16 | + |
| 17 | +DOCUMENT(); # This should be the first executable line in the problem. |
| 18 | + |
| 19 | +loadMacros( |
| 20 | + "PGstandard.pl", |
| 21 | + "PGchoicemacros.pl", |
| 22 | + "PGasu.pl", |
| 23 | + "PGcourse.pl", |
| 24 | + "MathObjects.pl", |
| 25 | + "contextFraction.pl" |
| 26 | +); |
| 27 | + |
| 28 | +sub pick { |
| 29 | + my ($k, @in) = @_; |
| 30 | + my @out = (); |
| 31 | + while (@out < $k) { push( @out, splice(@in, random(0,$#in), 1) ); } |
| 32 | + @out; |
| 33 | +} |
| 34 | + |
| 35 | +TEXT(beginproblem()); |
| 36 | +$showPartialCorrectAnswers = 1; |
| 37 | +Context("Fraction-NoDecimals"); |
| 38 | + |
| 39 | +my @c = ( |
| 40 | + (-11,-7,-5,5,7,11)[random(0,5)], |
| 41 | + (-7, -5,-3,3,5, 7)[random(0,5)], |
| 42 | + (-8,-7,-5,-4,-2,2,4,5,7,8)[random(0,9)], |
| 43 | + (-7,-5,-3,3,5,7)[random(0,5)], |
| 44 | + (-5,-4,-3,3,4,5)[random(0,5)], |
| 45 | +); |
| 46 | + |
| 47 | +@r = ( |
| 48 | + Compute(($c[0]%12)."*pi/6")->reduce, |
| 49 | + Compute(($c[1]%8)."*pi/4")->reduce, |
| 50 | + Compute(($c[2]%6)."*pi/3")->reduce, |
| 51 | + Compute(($c[3]%4)."*pi/2")->reduce, |
| 52 | + Compute(($c[4]%2)."*pi/1")->reduce |
| 53 | +); |
| 54 | + |
| 55 | +@d = ( |
| 56 | + Compute("30*$c[0]"), |
| 57 | + Compute("45*$c[1]"), |
| 58 | + Compute("60*$c[2]"), |
| 59 | + Compute("90*$c[3]"), |
| 60 | + Compute("180*$c[4]") |
| 61 | +); |
| 62 | + |
| 63 | +foreach (0..$#c) { $s[$_] = ($c[$_] < 0) ? "" : "\phantom{-}"; } |
| 64 | + |
| 65 | +@i = pick(5,(0..4)); |
| 66 | + |
| 67 | +Context()->texStrings; |
| 68 | +BEGIN_TEXT |
| 69 | + |
| 70 | +Convert the following $BBOLD degree $EBOLD measures to $BBOLD radians. $EBOLD$BR |
| 71 | +(Write your answers as angles \(0 \le \theta < 2\pi \). Write as a fraction |
| 72 | +using \(\fbox{pi}\) for \(\pi\).) |
| 73 | + |
| 74 | +END_TEXT |
| 75 | +for ($j=0; $j <= $#d; $j++) { |
| 76 | +BEGIN_TEXT |
| 77 | + |
| 78 | +$PAR $SPACE $SPACE |
| 79 | +\($s[$i[$j]]$d[$i[$j]]\ \text{degrees}\ = \ \) |
| 80 | +\{ ans_rule(10) \} \(\text{radians}\) |
| 81 | + |
| 82 | +END_TEXT |
| 83 | +} |
| 84 | + |
| 85 | +Context()->normalStrings; |
| 86 | + |
| 87 | +for ($j=0; $j <= $#r; $j++) { |
| 88 | + ANS( $r[$i[$j]]->cmp() ); |
| 89 | +} |
| 90 | + |
| 91 | +ENDDOCUMENT(); # This should be the last executable line in the problem. |
| 92 | + |
0 commit comments