First, crime by or among other young people doesn’t enter the equation as justification or a legal defense by the teacher.
With that aside, the question becomes whether using the N word is grounds for violent assault by a teacher upon a student. Legally, no it is not. Socially, many think it...