I did that too, though in BASIC on a TI-83+. When I showed it to my math teacher, she said that I could use the program on any future homework and tests as long as I turned in a paragraph explaining step-by-step how the program worked.
I also typed all my papers and assignments because my handwriting was atrocious. Only a few teachers took issue with this, and as an adult, I can't say I've had to do any cursive or write out an essay on paper for any reason.