Posted: Tue Feb 18, 2003 1:38 am Post subject: help with randomize
i'm sorta new to turing, i need help with randomize words
Posted: Tue Feb 18, 2003 8:19 am Post subject: (No subject)
there're two ways of getting a random number... ether rand() which returns a random float point number between 0 and 1 or randint() with returns a random integer in the range your specify (which is basically a modified rand anyway)
To get a random word, you can store your words in an array and use random integer to access your array.
such as put word(Rand.Int(1,10)) or if you don't know arrays, you can set up few if statments (which is not as good).
if x = 1 then
put "word 1"
elsif x = 2 then
put "word 2"
elsif x = 10 then
put "word 10"