##DESCRIPTION # Jonathan Duncan # Department of Mathematics, Indiana University, Bloomington, IN # Maki & Thompson, Finite Mathematics 4th Ed, Chapter 4, Section 1, Problem 31 ##ENDDESCRIPTION ##KEYWORDS('probability density function') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "MathObjects.pl", "scaffold.pl" ); ################################################################################ TEXT(&beginproblem); \$ans[0]=1; \$ans[1]=0.0001; \$ans[2]=0.0001; \$answer_evaluator_1 = (num_cmp(\$ans[0], mode=>'strict', tol=>0.5))[0]; Scaffold::Begin(is_open => "correct_or_first_incorrect"); ####### part 1 Section::Begin("Part 1"); BEGIN_TEXT Enter 1: \{ans_rule(5)\} END_TEXT ANS \$answer_evaluator_1; Section::End(); Section::Begin("Part 2"); BEGIN_TEXT Enter 0.0001: \{ans_rule(5)\} \{ begintable(1) . row('Enter 0.0001') . row(ans_rule(5)) . &endtable() \} END_TEXT map {ANS Real(\$_)->cmp} @ans[1..\$#ans]; Section::End(); Scaffold::End(); ENDDOCUMENT(); # This should be the last executable line in the problem.