WeBWorK Problems

by Carl Yao -
Number of replies: 1
Hello:

I'm trying to ask WeBWorK to accept a list of strings as answers, with no luck. For example, I want a,b,c to be the answer, but I need the ability to combine two lists, like the following code.

It generates and error. Is there a way to do this?

Thanks!

Carl Yao

Context("Numeric");

$d = Compute("a");$l1 = List($d);$e = Compute("b","c");
$l2 = List($e);

$l3 =$l1+$l2; BEGIN_PGML [___________]{$l3}

END_PGML

Re: list of letters as answer

by Ryan Maccombs -
See http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3497

In particular, I like

"

Alternatively, you might want to use the contextString.pl context, which allows only string answers, and only the ones your define. Here is one approach: