## WeBWorK Problems

### Re: Author newbie: answer to be variable - 1

by Davide Cervone -
Number of replies: 0

First, be sure to load the MathObjects.pl macros via

    loadMacros("MathObjects.pl");

at the top of your problem.

Second, if you don't want the correct answer to appear as $num-1 (e.g., if$num is 3, the correct answer will show as 3-1), then you can do either

    $new = Compute($num-1);

(with no quotation marks, so the subtraction is done first and THEN Compute() is called on the result), or
    $new = Real($num-1);

which creates a Real MathObject directly.