This demonstrates the Percent context.
Download file: Percent.pg
DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'contextPercent.pl', 'PGcourse.pl');
Preamble
The contextPercent.pl
must be loaded.
Context('Percent'); $p = random(5, 95, 5);
Setup
The Percent
context must be loaded.
BEGIN_PGML Enter [$p]% [__]{Real($p)} END_PGML
Statement
The answer can be entered with a %
or with the work percent
.
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.