Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread Alan Gauld
> My main concern is the compare_objects function. Is > there any easier way to write it? Actually, the > function does not work because "else condition:" > causes a syntax error. I'd do that with a two dimernsional table. The table would be indexed by the computers choice and the human choice

[Tutor] Python Block

2006-08-11 Thread Terry Peppers
I'm really blocked right now, and I don't want to post this to the main Python list since I think the answer is probably right in front of my face. I'm clearly just too close to see it. I'm able to do frequency counts of items in a list by doing the following: >>> list = ["5100", "5100", "5100",

Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread Robert Wierschke
the else part can't have a condition!!! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread Luke Paireepinart
Robert Wierschke wrote: > the else part can't have a condition!!! > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > Are you referring to Alan's post? You should have included the original text in your reply

Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread wesley chun
> This looks like a fun project to work on. From > reading the description, I feel this would be pretty > straight forward game to program. However, I have no > idea how the computer would decide if it wanted a > rock, paper, or a pair of scissors. Any hints? christopher, this is indeed a *gr

Re: [Tutor] Python Block

2006-08-11 Thread wesley chun
On 8/11/06, Terry Peppers <[EMAIL PROTECTED]> wrote: > I'm really blocked right now, and I don't want to post this to the > main Python list since I think the answer is probably right in front > of my face. I'm clearly just too close to see it. > > "5100", "foo" > "5100", "-" > "5100", "-" > "5100"

Re: [Tutor] rock, paper, scissors

2006-08-11 Thread Christopher Spears
--- Tom Wilson <[EMAIL PROTECTED]> wrote: > hi, > > could you please explain to me how your rock paper > scissors game script > works because i am a bit confused. > > thanks > tom > > The game does not work in its current form, which may be some cause for confusion. :-) In designing the pr

Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread Ismael Garrido
Luke Paireepinart escribió: > Robert Wierschke wrote: > >> the else part can't have a condition!!! >> ___ >> Tutor maillist - Tutor@python.org >> http://mail.python.org/mailman/listinfo/tutor >> >> >> > Are you referring to Alan's post? > You

Re: [Tutor] Rock, Paper, Scissors

2006-08-11 Thread Luke Paireepinart
> He wasn't. From the original post: > > elif human.choice == 'rocks' and computer.choice == > 'scissors': > print "Human wins!" > human.points = human.points + 1 > else human.choice == 'scissors' and computer.choice > == 'rocks': > print "