Parent Directory
|
Revision Log
Revision 94 - (view) (download)
| 1 : | jj | 94 | ## -*- perl -*- ## |
| 2 : | ## Line above puts emacs in perl mode | ||
| 3 : | ## | ||
| 4 : | ## Description | ||
| 5 : | ## This is a generic problem template | ||
| 6 : | ## EndDescription | ||
| 7 : | |||
| 8 : | DOCUMENT(); | ||
| 9 : | loadMacros("PG.pl", | ||
| 10 : | "PGbasicmacros.pl", | ||
| 11 : | "PGchoicemacros.pl", | ||
| 12 : | "PGanswermacros.pl", | ||
| 13 : | "PGauxiliaryFunctions.pl", | ||
| 14 : | "PGgraphmacros.pl", | ||
| 15 : | "Dartmouthmacros.pl"); | ||
| 16 : | |||
| 17 : | |||
| 18 : | ## Do NOT show partial correct answers | ||
| 19 : | $showPartialCorrectAnswers = 0; | ||
| 20 : | |||
| 21 : | $r = random(2, 20); | ||
| 22 : | |||
| 23 : | @answers = ( | ||
| 24 : | "\($LBRACE (x,y) | -x \le y \le x $RBRACE\)", | ||
| 25 : | "\($LBRACE (x,y) | -x < y < x $RBRACE\)", | ||
| 26 : | "\($LBRACE (x,y) | x \ge y $RBRACE\)", | ||
| 27 : | "\($LBRACE (x,y) | -x < y \le x $RBRACE\)", | ||
| 28 : | "the whole xy-plane", | ||
| 29 : | ); | ||
| 30 : | @permutation = NchooseK(5,5); | ||
| 31 : | |||
| 32 : | ## Ok, we are ready to begin the problem... | ||
| 33 : | ## | ||
| 34 : | TEXT(beginproblem()); | ||
| 35 : | |||
| 36 : | |||
| 37 : | BEGIN_TEXT | ||
| 38 : | $BR | ||
| 39 : | |||
| 40 : | The largest set on which the funtion \(f(x,y) = \sqrt{x+y} - \sqrt{x-y}\) | ||
| 41 : | is continuous is \{ans_rule()\} | ||
| 42 : | |||
| 43 : | $PAR | ||
| 44 : | END_TEXT | ||
| 45 : | |||
| 46 : | BEGIN_TEXT | ||
| 47 : | \{ (OL(@answers[@permutation])) \} | ||
| 48 : | |||
| 49 : | END_TEXT | ||
| 50 : | |||
| 51 : | @inverted_alphabet = @ALPHABET[invert(@permutation)]; | ||
| 52 : | |||
| 53 : | ANS(str_cmp($inverted_alphabet[0])); | ||
| 54 : | |||
| 55 : | ENDDOCUMENT(); | ||
| 56 : | |||
| 57 : | |||
| 58 : | |||
| 59 : |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |