The command 'rand' generates a random number from 0 to 65535. To restrict that range to a smaller range, you can use the modular arithmetic operator ^ like so: rand^37. This divides the random number by 37 and returns the remainder. By the nature of the remainder, its range is from 0 to N-1 when you divide by N, so this function returns your desired number from 0 to 36.