AITA For snapping at my teacher?

For context I am a junior in high school and I have a B- Average however my math teacher and I Do not see eye to eye and this often ends up with me being singled out in class. On multiple occasions he has accused me of cheating on my homework because the grade is usually better than classwork. Today I had enough, he told me that I better have a Great excuse as to why I had once again aced my homework. Instead of explaining it to him for the 6th time I snapped and told him exactly what was wrong. I had told him the following: | In case you were wondering as to why I always seem to ace the homework yet only do subpar work in the classroom, it is because at home i have a beautiful thing called silence and peace of mind because I do Not have to listen to you Nagging and Whining on how we (the class) know nothing because we do better on homeworks therefore we must have cheated. I also do not like being singled out. I will not be turning in my work for my homework as I am the only one having to turn it in. any further attempts like this will be ignored. I have Tried to explain that I Do not cheat on homeworks and have instead decided that I do cheat and end it there. Hopefully this is a Good enough "Excuse" for you. |AITA?