Hello all:
I am beginner at using this , this code takes long time to load , any idea of fixing this up:
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
"contextCurrency.pl",
"PGcourse.pl",
);
TEXT(beginproblem());
Context("Currency");
$showPartialCorrectAnswers = 1;
do{$a = Currency(random(15000,30000,5));
$b = Currency(random(20000,40000,5));
$c = Currency(random(50,300,5));
$d = Currency(random(20,100,5));
$y = random(1,1000,1);
$m=$a+$c*$y;
$n=$b+$d*$y;
} until ($m==$n);
@r = ('Mae','Suzan', 'Donna');
$r_index = random(0,2,1);
$r = $r[$r_index];
BEGIN_PGML
[$r] currently sells televisions for company A at a salary of [$a] plus a [$c] commission for each television she sells. Company B offers her a position with a salary of [$b] plus a [$d] commission for each television she sells. How many televisions would [$r] need to sell for the options to be equal?
[$r] needs to sell [________]{$y} televisions.
END_PGML
ENDDOCUMENT(); # This should be the last executable line in the problem.