Re: Help with arrays

2009-08-26 Thread Dave Angel
Mart. wrote: On Aug 26, 3:02 am, Dave Angel wrote: Stephen Fairchild wrote: Philip Semanchuk wrote: On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: Hello! I'm working on an exercise wherein I have to write a Guess The Number game, but it's the computer who's guessing M

Re: Help with arrays

2009-08-26 Thread Mart.
On Aug 26, 3:02 am, Dave Angel wrote: > Stephen Fairchild wrote: > > Philip Semanchuk wrote: > > >> On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: > > >>> Hello! I'm working on an exercise wherein I have to write a Guess The > >>> Number game, but it's the computer who's guessing MY number. I can

Re: Help with arrays

2009-08-26 Thread Stephen Fairchild
Dave Angel wrote: > With this change the best solution changes from a random shuffle to a > binary search. Which is not what the OP asked for. Anyway, I think whatever solution is chosen it's probably best written as a generator. The new pushback syntax may prove useful. -- Stephen Fairchild --

Re: Help with arrays

2009-08-25 Thread Dave Angel
Stephen Fairchild wrote: Philip Semanchuk wrote: On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: Hello! I'm working on an exercise wherein I have to write a Guess The Number game, but it's the computer who's guessing MY number. I can get it to work, but there's one obvious problem: t

Re: Help with arrays

2009-08-25 Thread Mart.
On Aug 25, 11:50 pm, Stephen Fairchild wrote: > Philip Semanchuk wrote: > > > On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: > > >> Hello! I'm working on an exercise wherein I have to write a Guess The > >> Number game, but it's the computer who's guessing MY number. I can get > >> it to work, but

Re: Help with arrays

2009-08-25 Thread Stephen Fairchild
Philip Semanchuk wrote: > > On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: > >> Hello! I'm working on an exercise wherein I have to write a Guess The >> Number game, but it's the computer who's guessing MY number. I can get >> it to work, but there's one obvious problem: the computer generates >

Re: Help with arrays

2009-08-25 Thread Philip Semanchuk
On Aug 25, 2009, at 6:14 PM, Gleb Belov wrote: Hello! I'm working on an exercise wherein I have to write a Guess The Number game, but it's the computer who's guessing MY number. I can get it to work, but there's one obvious problem: the computer generates random numbers until one of them corres

Help with arrays

2009-08-25 Thread Gleb Belov
Hello! I'm working on an exercise wherein I have to write a Guess The Number game, but it's the computer who's guessing MY number. I can get it to work, but there's one obvious problem: the computer generates random numbers until one of them corresponds to my number, but it will often generate one

Re: Help with arrays of strings

2006-07-31 Thread Jon Smirl
On Mon, 31 Jul 2006 18:33:34 -0700, Simon Forman wrote: > Splitting a string into a list (array) of lines is easy enough, if you > want to discard the line endings, Thanks for the pointers, that should be enough to get me started. I had started off in the wrong direction looking for arrays instea

Re: Help with arrays of strings

2006-07-31 Thread Simon Forman
Jon Smirl wrote: > I only have a passing acquaintance with Python and I need to modify some > existing code. This code is going to get called with 10GB of data so it > needs to be fairly fast. > > http://cvs2svn.tigris.org/ is code for converting a CVS repository to > Subversion. I'm working on cha

Help with arrays of strings

2006-07-31 Thread Jon Smirl
I only have a passing acquaintance with Python and I need to modify some existing code. This code is going to get called with 10GB of data so it needs to be fairly fast. http://cvs2svn.tigris.org/ is code for converting a CVS repository to Subversion. I'm working on changing it to convert from CV