I teach a class where students do a weekly lab in Mathematica. They do it in a computer lab, and because there are many of them, and only one of me, I encourage them to help one another. Unfortunately, that means I get a lot of labs with the exact same
Plot commands, or the exact same "make up your own example" solutions, etc.
What I would like to do is, in some sense, "randomize" the lab when each student opens it. To keep things simple, Let us consider a question that looks like
Find the square root of the following number: #
Here, # would ideally be replaced by a random number as soon as the student opens the lab. That is, I am looking for a way to do the following:
- run a command as soon as the lab is opened
- the only remnant of this command, after it is run, is its output
I know that second one is probably difficult, but I would even be satisfied with a way to have # reference the output of a hidden command, for example.
PS: I have no idea what the tags should be for this question, so I chose by best guesses; please feel free to improve them.