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

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

Wed May 10 16:17:05 2006 UTC (7 years ago) by jjholt
File size: 1501 byte(s)
```Added tags.
```

```    1 ## DESCRIPTION
2 ##   Flux of a Population
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Flux', 'Increase', 'Decrease')
6 ## Tagged by nhamblet
7
8 ## DBsubject('Elementary Mathematics')
9 ## DBchapter('Numbers')
10 ## DBsection('Integers')
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 = ( "Persecuted",
33              "Attracted by the promise of a better life",
34        "Anti-social",
35        "Born"
36      );
37
38 #Array of 0 .. 3 in random order
39 @permutation = NchooseK(4,4);
40
41 #Permute the choices
42 @randomChoices = @choices[@permutation];
43
44 #The following few lines ensure that the letter representing
45 #the correct answer is also properly randomized
48
49 BEGIN_TEXT
50 The population of Elves in Lorien is constant. If five Elves per day cross outward over the boundary of
51 Lorien, and none ever return, then we can conclude that Elves in Lorien are being:
52 \$PAR
53  \{ans_rule(10)\}
54 END_TEXT
55
56 TEXT(&OL(@randomChoices));
57
58 ANS(str_cmp(\$ans));
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.
```