Computer Science Canada help with randomize |
Author: | m4rk [ Tue Feb 18, 2003 1:38 am ] |
Post subject: | help with randomize |
i'm sorta new to turing, i need help with randomize words |
Author: | Tony [ Tue Feb 18, 2003 8:19 am ] | ||
Post 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).
|