Calculating and showing correct answers based on multiple-choice questions in PDF form

You'll need to use Javascript to do this. I'll put here a stub, as a complete answer would require extensive coding, and is off-topic here.

The code goes into each field's "custom validation script".

To check whether the correct checkbox is checked, for each field in your verification table, you'll need to insert an if.. else.. statement (copied from this answer on stackoverflow)

if (this.getField("myCheckBox").value != "Off") { 
   // the box is checked 
   // do what should be done when the box is checked 
} else { 
   // the box is not checked 
   // do what should be done when the box is not checked 
}

To set the color of your field, according to this post you need the code:

event.target.fillColor = color.green;

So, in total, this would become something like:

if (this.getField("myCheckBox").value != "Off") { 
   // the box is checked 
   event.target.fillColor = color.green;
} else { 
   // the box is not checked 
   event.target.fillColor = color.red;
}

where myCheckBox is the name of the checkbox for the correct answer.

I have not validated this code, as this should be done by you. If you need further help for your code, ask a question on the stack overflow community