The
problem is attached below. It creates the problem set fine, then it
displays it well. When I try to evaluate (submit answers) is where the
problem comes. It does not like the "p" being part of the answer.
Body of the problem
##DESCRIPTION
##KEYWORDS('derivatives')
## Derivatives and the basic functions of economics
##ENDDESCRIPTION
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
PG.pl,
PGbasicmacros.pl,
PGchoicemacros.pl,
PGanswermacros.pl,
PGauxiliaryFunctions.pl
);
TEXT(&beginproblem);
$showPartialCorrectAnswers = 1;
$a1 = random(0.04,0.05,0.001);
$b1 = random(700,800,5);
$p1 = random(320,420,5);
$ep1 = $p1/($b1-$p1);
$funct1 = "(-1/$a1)*\p+$b1/$a1";
$funct2 = "\p/($b1-\p)";
TEXT(EV2(<<EOT));
The demand equation for a certain commodity is given by the equation
( p = $b1 - $a1 x ), where ( p ) denotes the unit price (in dollars) and
( x ) denotes the quantity demanded.
Express the quantity demanded as a function ( f(p) ) of the price,
i.e solve for ( x ).
$BR $BR {ans_rule(48) }
$BR
EOT
$ans = $funct1;
&ANS(function_cmp($ans));
TEXT(EV2(<<EOT));
Find the Elasticity of demand function ( E(p) ).
$BR $BR {ans_rule(48) }
$BR
EOT
$ans = $funct2;
&ANS(function_cmp($ans));
TEXT(EV2(<<EOT));
Find The elasticity of demand when the price ( p=$p1 ).
$BR $BR {ans_rule(24) }
$BR
EOT
$ans = $ep1;
&ANS(std_num_cmp($ans));
ENDDOCUMENT(); # This should be the last executable line in the problem.
<| Post or View Comments |>
|