About the use of sets I found another idea: Eratosthene's sieve. Basically you create a set containing all integers from 2 to, say, 200.
Then, beginning with 2, you choose remove all multiples of the number you choose from the set. Then you go to the next number in the set and so on... The difficulty is to choose the right collection, as a set is not ordered and it is not easy to loop on the prime divisors... I made it on this article (near the middle): http://irem.univ-reunion.fr/spip.php?article742 Of course you can have the set of primes directly under Pharo with isPrime as we did here: http://www.epi.asso.fr/revue/articles/a1211b.htm (I had forgotten this) Alain On Thu, Jun 26, 2014 at 8:21 PM, Hilaire Fernandes < hilaire.fernan...@gmail.com> wrote: > Great! > Now I wonder how it could be used within Dr. Geo. > > Thanks > > Hilaire > > Le 25/06/2014 18:33, Alain Busser a écrit : > > About the birthday problem, I already pulished something that I had > > exeperimented in the classroom, but it is in French: > > http://irem.univ-reunion.fr/spip.php?article618 (clic on "problème des > > anniversaires" tab). The idea is that if you add say 30 times a "365 > > atRandom" to a bag (instead of a set) it happens now and then that a > > number appear more than once. In this classroom, two students actually > > had the same birthday, and they were eager to know of it happens often, > > so that they were very active for this exercise. > > > > Happy reading ;-) > > > > Alain > > > > > > On Wed, Jun 25, 2014 at 12:10 PM, hilaire > > <hf...@free.fr > > <mailto:hf...@free.fr>> wrote: > > > > Alain, > > > > I love very much your cultural insight and I would like to see more > > examples > > like this one applied to Dr. Geo scripting or Smalltalk sketches. > > Personally, I don't have the time to both develop Dr. Geo *and* to > > investigate such examples; contributions like yours are more than > > welcome. > > > > Thanks > > > > Hilaire > > > > > > > > -- > > View this message in context: > > http://forum.world.st/A-question-about-sets-tp4763094p4764640.html > > Sent from the Pharo Smalltalk Users mailing list archive at > Nabble.com. > > > > > > -- > Dr. Geo http://drgeo.eu > iStoa - https://launchpad.net/istoa > > >