Wrote a TI-83 program (TI Basic) for a geometry course in high school. About a month prior to the feared final exam, I combed through all of our coursework to catalogue all of the calculations needed then wrote a program that would solve for any query (length of side, angles, etc.) based on the shape and input data.
I read the operators guide to the device cover-to-cover and found a way to store the program such that the teacher's method of "clearing" the device would not remove my program.
On the day of the test I realized I had accidentally taught myself geometry, as I didn't need the calculator at all and could do the calculations in my head. I did, however, use the TI-83 to verify my answers before handing in the test. According to my teacher I not only had a perfect score but did so in record time, and suspiciously so did my two best friends.
Nothing ever came of it, but I enjoy the fact that I accidentally learned a course to such proficiency by trying to cheat.
While in my Algebra II class, we were studying polynomial expansion, and I wrote a program on my TI-85 that would not only expand things like (2x^2 + x + 3)^4, but it would show the work. I literally just had to enter a couple values and then verbatim copy what it spit out onto the paper.
I asked the teacher if I could use it on the test, and she was like "If you can write a program that doesn't just solve it, but shows the work, then obviously you know the material incredibly well, so there's no need to make the test tedious. Go for it, just don't share the program with any of your friend."
The last bit was easy because I didn't have any friends. :-(
You might find it funny that a scaled-up version of this was the plot of a 1958 children's book, Danny Dunn and the Homework Machine. (Except the teacher figures it out and starts assigning the kids using the computer more advanced work that they have program the computer to perform.)
I actually got into programming on my graphing calculator in high school in the early 2000s. Most of our tests from algebra up thru calculus were simply "apply the correct formula to the problem". I would simply program the calculator with the formulas, use it to calculate the answers and then work backwards to "show my work". I got 100% on every test for 4 years. I'm still not sure whether I feel guilty or not.
I think this is every teacher's goal with tests where you can bring "one sheet of handwritten A4 paper" along as a cheat sheet.
The smartass students who don't want to study find ways to cram an incredible amount of information onto these sheets... and through this they end up actually learning much more than if the cheat sheet wasn't an option.
After years of similar work, mine culminated in a Link Cable Chat Program that I wrote on two calculators at the start of a big multi-hour test.
We didn't use it to cheat -- literally just to chat.
Similarly, we'd been writing programs to solve our problems all year so we already knew all the formulas (because we'd been re-entering the programs as needed on fresh calculators).
The teacher knew, which is why I think she allowed it.
In calculus I wrote a program that solved the last problem of the exam, during the exam. I wrote down the source code in the exam by hand. I got an A but the teacher wrote a letter to my parents saying he was concerned about my reliance on programming.
I read the operators guide to the device cover-to-cover and found a way to store the program such that the teacher's method of "clearing" the device would not remove my program.
On the day of the test I realized I had accidentally taught myself geometry, as I didn't need the calculator at all and could do the calculations in my head. I did, however, use the TI-83 to verify my answers before handing in the test. According to my teacher I not only had a perfect score but did so in record time, and suspiciously so did my two best friends.
Nothing ever came of it, but I enjoy the fact that I accidentally learned a course to such proficiency by trying to cheat.