Demonstrate how to pick a random element from a list.




' Pick random element
OPTION BASE 1
DECLARE words$[6]
FOR i = 1 TO 6 : READ words$[i] : NEXT
DATA "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta"
 
element = RANDOM(6) + 1
PRINT "Chose ", element, ": ", words$[element]