> 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
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",
the else part can't have a condition!!!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
> 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
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"
--- 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
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
> 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 "