WeBWorK Problems

disabling the evaluation of constants

Re: disabling the evaluation of constants

by Gavin LaRose -
Number of replies: 0
Hi Michael,

If you use Compute() instead of Formula(), the correct answer string is set to the input string: see http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2321 for an example. This may require that you actually code the derivative as $df = Compute("ln(2)*2^x"), rather than using the MathObjects differentiation method, however.

This is harder if you are working with Real valued answers; there are some threads in the Forum on fractional answer evaluation that may be of interest if you end up on that particular road.

Gavin