WeBWorK Main Forum

How make Webwork display *MULTILINE* string answers properly when student wants Webwork to "Show correct answers" ?

Re: How make Webwork display *MULTILINE* string answers properly when student wants Webwork to "Show correct answers" ?

by Davide Cervone -
Number of replies: 0
Yes, it "works" in this case, but it is bad practice, and won't always work. When used as arguments to a function, arrays are "flattened" I.e., f((1,2),(3,4)) is the same as f(1,2,3,4), so your array of one value is the same as passing one value directly, but the semantics are wrong, and it is a bad habit to make arrays when you mean scalars.