When I was at school I had one of these:
https://en.wikipedia.org/wiki/Psion_Series_3
And got in trouble for writing programs in OPL to solve math problems.
I reckon I deserved extra credit for initiative. The experience of learning to program has certainly turned out to be ultimately more useful than learning to do math without a calculator.
(Not that I think that learning to do math without a calculator is useless, mind you.)
OPL: https://en.wikipedia.org/wiki/Open_Programming_Language