[npl] / trunk / NationalProblemLibrary / ma122DB / set0 / prob5.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ma122DB/set0/prob5.pg

Sun Mar 19 19:35:27 2006 UTC (7 years, 2 months ago) by jj
File size: 1662 byte(s)
Fixed tag typos.


    1 ##DESCRIPTION
2 ##  practice problem
3 ##ENDDESCRIPTION
4 ## nsilva tagged and PAID on 9-27-2004
5
6 ## DBsubject('WeBWorK')
7 ## DBchapter('WeBWorK Tutorial')
8 ## DBsection('WeBWorK Tutorial')
9 ## Date('6/3/2002')
10 ## Author('')
11 ## Institution('')
12 ## TitleText1(' ')
13 ## EditionText1(' ')
14 ## AuthorText1(' ')
15 ## Section1(' ')
16 ## Problem1(' ')
17
18
19 ##KEYWORDS('sample')
20
21 DOCUMENT();        # This should be the first executable line in the problem.
22
24 "PG.pl",
25 "PGbasicmacros.pl",
26 "PGchoicemacros.pl",
28 "PGauxiliaryFunctions.pl"
29 );
30
31 TEXT(beginproblem());
32 $showPartialCorrectAnswers = 0; 33 34 35$a = random(100,200,1);
36 $b = random(250,350,1); 37$c = random(-31,-3,1);
38 TEXT(EV2(<<EOT));
39 This problem demonstrates a WeBWorK question that requires you to enter a number or a fraction. $PAR 40 Evaluate the expression $$\frac{|a-b|}{|c|}$$. Give you answer in decimal notation 41 correct to three decimal places or give your answer as a fraction. 42$BR $BR \{ANS_RULE(1,10) \} 43$BR
44 EOT
45 $ans = abs($a-$b)/abs($c);
46 ANS(num_cmp($ans, mode=>"arith")); 47 TEXT(<<EOT); 48$PAR
49 Now that you have finished you can use the "Prob. List" button at the top of the page
50 to return to the problem list page.  You'll see that the problems you have done have been
51 labeled as correct or incorrect, so you can go back and do problems you skipped or couldn't
52 get right the first time.  Once you have done a problem correctly it is ALWAYS listed as correct
53 even if you go back and do it incorrectly later.  This means you can use WeBWorK to review
55
56 EOT
57
58 ENDDOCUMENT();        # This should be the last executable line in the problem.