WeBWorK Problems

Requiring an integer answer

Re: Requiring an integer answer

by Davide Cervone -
Number of replies: 0
Note that LimitedNumeric does not require that the student enter an integer. For example, if $a = 3 and $b = 4, then an answer of 7.000001 is marked correct. If you want to force integers, then you might add
    Parser:Number::NoDecimals();
right after the line where you specify the LimitedNumeric context.

Davide