## DESCRIPTION
## Answer is an inequality
## ENDDESCRIPTION

## DBsubject(WeBWorK)
## DBchapter(WeBWorK tutorial)
## DBsection(PGML tutorial 2015)
## Date(06/01/2015)
## Institution(Hope College)
## Author(Paul Pearson)
## MO(1)
## KEYWORDS('algebra', 'answer is an inequality')

#:% name = Answer as an Inequality
#:% type = Sample
#:% subject = [algebra, precalculus]
#:% categories = [fraction]

#:% section = preamble
#: The PODLINK('contextInequalities.pl') macro must be loaded
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextInequalities.pl', 'PGcourse.pl');

#:% section = setup
#: Require students to use inequalities by using `Context('Inequalities-Only')`.
#: Note that if `Context('Inequalities')` is used instead, then students could
#: also enter answers using interval notation. For more details, please see
#: PODLINK('contextInequalities.pl').
#:
#: The context flag `formatStudentAnswer => 'parsed'` is used so that the
#: student's answer is left as a fraction rather than reduced to a decimal.
Context('Inequalities-Only');
Context()->flags->set(formatStudentAnswer => 'parsed');

$a   = random(3, 9);
$ans = Compute("x >= -10 / $a");

#:% section = statement
BEGIN_PGML
Solve the inequality [``-[$a]x  \leq 10``].
Enter your answer using inequality notation.

[_]{$ans}

[@ helpLink('inequalities') @]*
END_PGML

#:% section = solution
BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();
