Forum archive 2000-2006

Barbra Bannon - Accepting answers only if they are correct to 3 decimal places

Barbra Bannon - Accepting answers only if they are correct to 3 decimal places

by Arnold Pizer -
Number of replies: 0
inactiveTopicAccepting answers only if they are correct to 3 decimal places topic started 4/8/2002; 5:01:23 PM
last post 4/8/2002; 9:27:00 PM
userBarbra Bannon - Accepting answers only if they are correct to 3 decimal places  blueArrow
4/8/2002; 5:01:23 PM (reads: 1173, responses: 1)
How to I check for an answer that is only correct if they included up to three decimal places?

<| Post or View Comments |>


userMichael Gage - Re: Accepting answers only if they are correct to 3 decimal places  blueArrow
4/8/2002; 9:27:00 PM (reads: 1604, responses: 0)
Hi Barbara,

Look at http://webhost.math.rochester.edu/webworkdocs/docs/pglanguage/manpages/num_cmp.

The short answer is that

ANS( num_cmp(4, tol=>.001));

will generate an answer evaluator which will accept answers between 3.999 and 4.001 (I'm not sure if the interval is open or closed :-) )

Setting

ANS( num_cmp(100, reltol=>1) );

will accept answers within 1% of the correct answer (e.g. + or - one in this case).

Hope this helps answer your question.

Did you want an answer evaluator that checked that the student's answer was correct to exactly 3 decimal places, no more, no less? That's doable, but not automatic.

-- Mike

<| Post or View Comments |>