DOCUMENT(); loadMacros("PGstandard.pl","MathObjects.pl","PGML.pl","PGcourse.pl",); Context("LimitedNumeric"); TEXT(beginproblem()); BEGIN_PGML Enter a number: [___] END_PGML ANS(Real(-1)->cmp(checker => sub{ my ($correct,$student,$ansHash) = @_; $student_ans=$student; return 1; } )); $student_ans=$student_ans+1; BEGIN_PGML Add 1 to your previous answer: [___]{$student_ans} END_PGML ENDDOCUMENT();