random()
Generate a random number between two values based on a uniform probability distribution
Last updated
random([min], [max])random(choices)def draw():
background(255,79,132)
names = ["John", "Ali", "Tamir", "Ibrahim"]
actions = ["plays", "watches", "doesn't like"]
things = ["football", "basketball", "chess"]
orange = (255,164,28)
purple = (112,88,255)
blue = (44,129,237)
colors = [orange,purple,blue]
fill(random(colors))
text(random(names), 75, 250)
fill(random(colors))
text(random(actions), 150, 150)
fill(random(colors))
text(random(things), 225, 50)