Why do you need a whole programming language to calculate the mark?
Simply use your programming language of choice to create a nice interface where the teachers have some flexibility.
You could for example have a simple input and allow the teachers to enter in some variable you've already defined, maybe $points and $max_score as well as a few basic math operators (*/-+) and then you can read the input and interpret it.
Alternatively you could use drop downs and other control to have a finer level of control, the options here are really only limited by your imagination.