Demonstrating a slightly more complex use of randomness within certain mathematical functions and repeat commands