Learning to use the random class, then defining functions to decompose