Forum archive 2000-2006

Holly Carley - preview/answer entered problem

Holly Carley - preview/answer entered problem

by Arnold Pizer -
Number of replies: 0
inactiveTopicpreview/answer entered problem topic started 9/28/2004; 10:45:46 AM
last post 9/28/2004; 2:41:01 PM
userHolly Carley - preview/answer entered problem  blueArrow
9/28/2004; 10:45:46 AM (reads: 1230, responses: 5)
A student enters 1/12 as the (correct) answer to a problem. The preview gives 1/12 0 and says she entered 0. It is therefore, of course, counted wrong. If she entered 12+ it is correct. Any idea about what is causing this problem?

Holly

<| Post or View Comments |>


userArnold K. Pizer - Re: preview/answer entered problem  blueArrow
9/28/2004; 10:57:26 AM (reads: 1432, responses: 0)
Hi Holly,

Can you give us some more informationn on this? E.g. what problem is the student working on? Entering 1/12 (when I try it) gives the correct response and entering 1/12+, 112, 12+ all give syntax errors as they should.

Are other students having similar problems?

Arnie

<| Post or View Comments |>


userHolly Carley - Re: preview/answer entered problem  blueArrow
9/28/2004; 11:28:31 AM (reads: 1432, responses: 0)
It is only for one student as far as I can tell. The code for the problem follows. It sounded like more a problem with how webwork understands the input. The code for the problem follows.

Holly

##DESCRIPTION ## Evalute a limit of a fraction of two polynomials, ## involves factoring ##ENDDESCRIPTION

##KEYWORDS('limits', 'factoring')

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros( PG.pl, PGbasicmacros.pl, PGchoicemacros.pl, PGanswermacros.pl, PGauxiliaryFunctions.pl );

TEXT(&beginproblem); $showPartialCorrectAnswers = 1;

@rt = (4,9,16,25,36); $i1 = random(0,4,1); $c = random(1,10,1); $a = $rt[$i1]; $b = $a+$c; $a2 = $a**.5;

TEXT(EV2(<<EOT)); Evaluate the limit [ lim_{ x rightarrow $b } frac {sqrt{x-$c}-$a2 }{x-$b} ] $BR {ans_rule(10) } $BR EOT

$ans = 1/(2*$a2); &ANS(num_cmp($ans));

ENDDOCUMENT(); # This should be the last executable line in the problem.

<| Post or View Comments |>


userArnold K. Pizer - Re: preview/answer entered problem  blueArrow
9/28/2004; 12:21:35 PM (reads: 1493, responses: 0)
Hi Holly,

This problem just uses the standard answer evaluator num_cmp which has been used by many thousands of students.

Could it be that the student entered 1/12 0 (1 slash 12 space 0)? WeBWorK interprets a space as multiplication (jutaposition) and this gives 0. At least that is what WeBWorK is telling you that the student entered. Did you see what the student entered? Can this bug be repeated?

Arnie

<| Post or View Comments |>


userJohn Jones - Re: preview/answer entered problem  blueArrow
9/28/2004; 12:51:03 PM (reads: 1480, responses: 0)
My guess is that there is a large number of spaces between the 12 and a 0, enough that you don't see the 0 inside the answer blank. We ran into this before. One way it happens is if some answer is put in by copy and paste, and you don't realize that there were lots of spaces in the paste.

Ways of testing for this are to look at the answer logs, or the database for the last answer, or to click in the answer blank and hit delete/backspace a lot, or to enter the problem and don't have webwork enter the previous answer for you.

On webwork's side, I think one of the bits of tidying it should do to student answers is to replace all sequences of whitespace with a single space. That should keep answers readable, but eliminate the problem I described (which may or may not be Holly's problem).

John

<| Post or View Comments |>


userHolly Carley - Re: preview/answer entered problem  blueArrow
9/28/2004; 2:41:01 PM (reads: 1488, responses: 0)
This was indeed the case.

Thank you!

<| Post or View Comments |>