Edit cell values of a data table

As a teacher I want to enter the students scores and basing on my grading key a grade/mark is automatically computed.

As a teacher I want to get an immediate validation error presented when the entered score is over/under the min/max score set for the grading key.

The table should have not more than 30 students/rows in average The teacher is creating 25-30 tests in average/year.

How would you let the teacher enter the data in a most effective and user friendly way?

enter image description here