## WeBWorK Problems

### answer checking a list of one list

by Gavin LaRose -
Number of replies: 2
Hi all,

I have a problem in which students are giving lists of pairs of strings. Thus, a correct answer might be (a,b), (c,d). Alternately, if only one pair of strings is correct, the answer might be a list of one pair: (a,b).

What I'm finding is that I can't get the case of a list of a list of one pair of strings to correctly answer-check. That is, if I define

$ans = List( List(String("a"),String("b")) ); I find that$ans is the list "a,b", not a list of one list of two strings: "(a,b)". At least, that's my interpretation. As a result, the student answer "a,b" is marked correct, but the answer "(a,b)" is marked wrong.

Davide