Answer:
Hi there! This can be implemented in a simple Python function which uses the "random" module to generate the number.
Explanation:
Using Python as the languge, we can write a the below code in a file called styles.py. The first line imports the randint function from the "random" module. The setStyles() function declares an array or 5 elements (here I have just used numbers but these could be string names of the stylesheets as well). Next, styleNum is assigned the random number and the associated stylesheet is selected from the array of stylesheets.
styles.py
from random import randint
def setStyles():
stylesheets = [1,2,3,4,5];
styleNum = randint(1,5);
stylesheet = stylesheets[styleNum];
print(stylesheet);
setStyles();