You are correct in that there should only be one draw loop. I’m not exactly sure how your student is generating the random number but my guess is he has a variable outside the draw loop generating the random number then uses that in the draw loop? Regardless, if we remember that the draw loop “loops” every 30 seconds or so, then a new random number needs to be generated in the draw loop. Here is a project from one of my students that is a good use of random number to generate moving stars (I think - maybe snow;). You can view the code by clicking VIEW CODE. The random number is in the y position for the small ellipses so that approximately 30 times per second - they are moved up and down the screen.
I hope this helps but if not, please let us know. Also, please share your student’s project so we have a better idea of how to help. You can do this by clicking on the blue SHARE button at the top of the project and then clicking COPY LINK TO PROJECT.