I'm sorry, but I'm having some difficulty understanding your question. Are you asking if school (or teacher) can legally prevent a child from doing a math assignment in grade 12? Please consider adding more information or details to your question to receive specific suggestions to resolve the situation.
In the meantime, I'm including below some information that may be relevant. Thanks for asking!