Percent Context

This demonstrates the Percent context.

Complete Code

Download file: Percent.pg

POD for Macro Files

PG problem file

Explanation

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.