Consider - an app that replicates this functionality on the phone, but tracks if the user at any point closes the app. This then is reported to the teacher so the teacher knows if there was any cheating.
This simple change will improve the quality of education and reduce the cost of calculators.