Is just the average suppose to be capped at 0 or 100, or is each individual test score suppose to be capped at 0 or 100?

If it's the first case, you need to place the code checking for 0 or 100...