>>59911392
If you're trying to cheat with it, other classmates will hear it too, will be wigged out by the high frequency pitch, will recognize the morse pattern, and, as I did when people used to use those "annoying high pitch sound apps", report the user to the teacher for a proper anal-expanding.
In the time you can code this and come up with a reliable work flow to get away with it (which won't be reliable because I fucking hate and report cheaters and so do other non-cheating classmates), you could just study and eek at least a B.