If you have a list of answers as a variable in the algorithm section of your question. e.g.

$TA=["2*Pi",5,"x/y"];

You can put the following grading code to award points based on how many input boxes have the correct answer.

The order of answer boxes in the html must be the same as the order in $TA. With this code each box is worth 1/n, where n is the number of answer boxes.