Use a random number in a function

I don't know how to put a random number in a function command. Like use it has an index in a variable function
Continue to help post