Very unusual! An app might be possible, you could check out the basic platforms to construct them. But that still sounds like a lot, unless you were some college major taking electronics or CIS courses in which case I would suspect you would know more about the subject. With that said, I am absolutely dumbfounded as to the reason for the assignment. Was the assignment given to every student?
If not, and this is some favor requested from you, then I would definitely be wondering the word "why". I mean, is it every day a teacher goes up to a student and requests this? Or did you provoke it in some fashion?
Outside of all of that, to answer the question, when you think about choosing a random sound from some storage or data base, you are getting into something a little more extensive like an app. Unless you were lucky enough to find some type of recording device that had the function to choose at random, which to my knowledge would be like playing the lottery (technically speaking about code 'if else then' in combination with recording devices).
If not that case, then the sounds that would be played would have to be in a random enough order that it seems like it is choosing sounds at random even so it is just playing down through a shuffled list. Or you could put a speaker in it that has wireless capabilities to your buddies mic outside of the class room, have him make the random noises for you when you see her open the box.. : D