It depends, if the teacher is being rude despite the class being nice then getting mad isn’t for no reason but if it is for no reason I think you should try to be nice to them if they are nice to you
Because she doesn't want to do the assignment and she doesn't want her past uncovered which is why Anagnos says, "Annie. I wrote them no word of your history."