I am trying to require that students enter a simplified exact answer that may contain pi. Thanks to Davide, I have a figured out a way to not allow decimals.
But now I am trying to figure out a way to require that students actually simplify their answers.
For example, for an answer of 256*pi/9, the checker accepts 512*pi/18 as correct, etc.
Another related issue I am having is that the displayed correct answer is actually not being correctly reduced either.
Here I have used the following code to set up the correct answer:
$ans = Formula("$aa^3*pi/18")->reduce();
ANS($ans->cmp());
where:
$aa = Real(random(5,15));
and in the specific scenario above $aa = 8.
Is there something I have missed that will at least display the correct answer in a the truly reduced form each time?
Thanks!
Paul