Numbas icon indicating copy to clipboard operation
Numbas copied to clipboard

Square brackets in answers

Open chrismgraham opened this issue 5 years ago • 0 comments

More discussion, than a suggestion. I have recently seen a few students entering answers like

exp(-t)*[cos(x)+sin(x)]

The students in question are taught to use square brackets for readability and naturally they extend this to answers in Numbas. I'm aware that square brackets set up or return list elements which makes this difficult to accommodate, so it may just be something to highlight to students in the introduction to the software.

On the other hand, the warning messages do not offer much - if the operator is included exp(-t)*[cos(x)+sin(x)] the student sees "No definition of '*' of correct type found", and without the operator exp(-t)[cos(x)+sin(x)] "No definition of 'listval' of correct type found". If possible a "did you mean..." would help.

chrismgraham avatar Dec 04 '19 16:12 chrismgraham