DOCUMENT(); loadMacros( "PGstandard.pl", # Standard macros for PG language "MathObjects.pl", "PGML.pl", "contextCurrency.pl", "PGcourse.pl", ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; Context("Currency"); # You should only uncomment this next line if you want # to swap the meaning of , and . in currency #Context()->currency->set(comma=>'.',decimal=>','); $a = Currency(random(1,100,1)); $b = Currency(random(1,40,1)); $x = Real(random(1,1000,1)); $y = Real(random(1,1000,1)); $m = $a * $x + $b * $y; $n = $x + $y; BEGIN_PGML Tickets to a Broadway show cost [$a] for adults and [$b] for children. The total receipts for [$n] tickets at one performance were [$m]. How many adult and how many child tickets were sold? Number of tickets sold for adults was [_____]{$x} Number of tickets sold for children was [_____]{$y} END_PGML ENDDOCUMENT();