Forum archive 2000-2006

Barbra Bannon - Null answer spaces

by Arnold Pizer -
Number of replies: 0
 Null answer spaces topic started 6/20/2002; 7:53:02 AMlast post 6/20/2002; 3:03:29 PM
 Barbra Bannon - Null answer spaces  6/20/2002; 7:53:02 AM (reads: 746, responses: 1) Hi, How do I set it so that if a result doesn't exist, the student can leave the answer space blank and have it be the answer? Is it something like $a = ""; ? Thanks, -Barbra <| Post or View Comments |>  Michael Gage - Re: Null answer spaces 6/20/2002; 3:03:29 PM (reads: 915, responses: 0) Hi Barbara, It would be hard to tell the difference between a blank answer and a question that hadn't been answered yet (e.g. the first time the problem is rendered to appear on the page). This is true even for paper homework. I've tended to use things like: enter DNE if the limit doesn't exist. To get the answer evaluator to check either for the string DNE or a number use the string option in num_cmp (see http://webhost.math.rochester.edu/webworkdocs/docs/pglanguage/manpages/num_cmp) and for an example look at the source http://webhost.math.rochester.edu/webworkdocs/ww/viewSource/setLimitsRates1_5Graphs/ur_lr_1-5_1.pg (std_num_str_cmp($a, ['DNE']) is a synonym for num_cmp(\$a, strings =>['DNE'] ) you should be able to use either one. Let us know if you can't. Here is what the result looks like (you can try it)http://webhost.math.rochester.edu/webworkdocs/ww/pgView/setLimitsRates1_5Graphs/ur_lr_1-5_1.pg Is this good enough? You could use ?? instead of DNE if you prefer. I'd be willing to investigate the possibility of checking blank answers, but I would want a concrete example where it would be desirable and clearly preferable to something like the above example. So far I haven't yet come up with such an example, but I'm willing to keep looking. Take care, Mike {pg <| Post or View Comments |>