Pregunta de entrevista de Redfin

How would you program a randomizer?