Re: Dice
Re: Dice
- Subject: Re: Dice
- From: "Adam K. Wuellner" <email@hidden>
- Date: Tue, 26 Oct 2004 11:38:42 -0500
On Oct 26, 2004, at 9:48 AM, Robert Poland wrote:
set names to {"one", "two", "three", "four", "five", "six"}
set roll to random number from 1 to 6
item roll in names
I tried this and got; -- by running over and over.
"four"
"two"
"two"
"six"
"four"
"two"
"two"
"two"
"four"
Doesn't seem very random at first glance.
set freq to {0, 0, 0, 0, 0, 0}
repeat 10000 times
set roll to random number from 1 to 6
set item roll of freq to (contents of item roll of freq) + 1
end repeat
freq
-- three sequential runs produced:
-- {1663, 1610, 1682, 1633, 1785, 1627}
-- {1669, 1698, 1646, 1644, 1676, 1667}
-- {1664, 1662, 1676, 1722, 1607, 1669}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Follow-Ups:
- Re: Dice
- From: Tom Humiston <email@hidden>
References: | |
| >Re:Dice (From: Kevin <email@hidden>) |
| >Re: Dice (From: Adrian Milliner <email@hidden>) |
| >Re: Dice (From: Robert Poland <email@hidden>) |