I found several instances of the topic; here is one you might like to consult:
INSTANT FREEZE-DRIED COMPUTER PROGRAMMING IN BASIC 2ND ASTOUNDING! EDITION An Active-participation & Well-tested Instructional Workbook for the Student, Absolute Beginner, & Compleat Novice For any brand of computer using Microsoft (tm) BASIC including Apple (tm), Radio Shack (tm), PET (tm) & Atari (tm), with annotations for North Star (tm) BASIC and DEC BASIC Plus (tm) BY Jerald R. Brown dilithium Press, Beaverton, Oregon Year of publication not given but this has to date from the 1980s. See pages 144-146 for the dice simulation routines. -CH-