• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Random number generator without duplicates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random number generator without duplicates?


  • Subject: Re: Random number generator without duplicates?
  • From: email@hidden
  • Date: Wed, 18 Apr 2001 13:53:31 -0700

>>> The AppleScript user who asked for a suggestion as to how to generate a
list of 6 random numbers probably doesn't care about any of this.

I for one appreciate this discussion and would like to see more like it!

>>>A simple readable script that produces a list of 6 numbers that are not
repeated and fall between 1 and 56, and hopefully clarifies the process in
such a way as to teach the method of it's logic, would have benefited him
and others on this list much more that this digresive discussion of
mathematical theory.

The original poster has a number of possible solutions to choose from
(including one which I still haven't been able to figure out and one from
Chris which seems to be the most efficient.)

Plus I much prefer seeing the list going off on a pure AppleScript
discussions than some of the other tangental topics we've explored
recently.

>>>Would make for bad days in Las Vegas.

Speaking of Vegas, here's a couple other things to think about:

One could write a script using the solutions provided here to simulate
dealing a round of poker,

5 non-repeating sequences of 5 "cards" from a range of one to 52.

Or one could simulate a Vegas Blackjack deal: 5 two "card" hands from a 4
"deck" shoe. In this case each card could repeat 4 times.

ES
--It's times like this when I wish I had more time on my hands


  • Prev by Date: Re: best way to send an e-mail with Applescript
  • Next by Date: Re: URL Access broken on MacOS X?
  • Previous by thread: Re: Random number generator without duplicates?
  • Next by thread: Re: Random number generator without duplicates?
  • Index(es):
    • Date
    • Thread