[npl] / trunk / NationalProblemLibrary / Rochester / setVectors0Introduction / ur_vc_0_6.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setVectors0Introduction/ur_vc_0_6.pg

Wed May 31 19:00:07 2006 UTC (6 years, 11 months ago) by jj
File size: 1484 byte(s)
```Fixed tag typos.
```

```    1 ## DESCRIPTION
2 ##   Rotation
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Rotation')
6 ## Tagged by nhamblet
7
8 ## DBsubject('WeBWorK')
9 ## DBchapter('WeBWorK Tutorial')
10 ## DBsection('WeBWorK Tutorial')
11 ## Date('5/30/2000')
12 ## Author('Joseph Neisendorfer')
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            "PGbasicmacros.pl",
24            "PGchoicemacros.pl",
26            "PGauxiliaryFunctions.pl");
27
28 TEXT( beginproblem() );
30
31 #Array of choices
32 @choices = ( "Wiggle His Nose",
33              "Hug Himself",
36        "Think of Sauron"
37      );
38
39 #Array of 0, 1, .. ,4 in random order
40 @permutation = NchooseK(5,5);
41
42 #Permute the choices
43 @randomChoices = @choices[@permutation];
44
45 #The following few lines ensure that the letter representing
46 #the correct answer is also properly randomized
49
50 BEGIN_TEXT
51 As Gandalf falls into the depths of Moria, he begins to spin. If he wishes to slow his rate of spinning, he should
52 do which of the following (type the appropriate letter)?
53 \$PAR
54  \{ans_rule(10)\}
55 END_TEXT
56
57 TEXT(&OL(@randomChoices));
58
59 ANS(str_cmp(\$ans));
60
61 ENDDOCUMENT();        # This should be the last executable line in the problem.
```