One other common mistake i've made myself is this (pseudocode):
[
randChoice=random(2)
if randChoice==0 then say "0"
if randChoice==1 then say "1"
]
You'd think this would work, but it will only work an incredibly small amount of the time. Why? You're not converting the random number into an integer. So it rolls numbers like 1.023882 or 0.47366 so it rarely ever hits exactly 0 or 1.
So, use this instead:
int(random(2))
And of course, remember random is zero based. So, int(random(2)) will give you either 0 or 1.
*Sigh, just saw the post above after I wrote this. You use floor, I use int.
<img src="smileys/smiley36.gif" border="0" align="middle" />