Most teachers were not good at checking this. There was an archive mechanism which would compress the file and IIRC, prevent it from showing up in the program list. You could of course just unarchive it.
Even though I never cheated, I never wanted my programs to get erased... I just created an image of the "memory erased" screen and showed that to the teachers.