Yes, but do you mean you already have a submit button?
The best way to do this is with a calculation script on a hidden field. This way the student can't see it and for the submit its just another submitted value.
To do this you need to make up a scoring template. A JavaScript Object is the best way to do this, where the element name is the field name for the question.
Then the script loops over the field names in the template to compare values.
However, the exact technique depends on how the scoring works. Is each question worth the same value? or are they all different?
Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often