On 2/14/07, Nathan Pinno <[EMAIL PROTECTED]> wrote:

>  I wrote a rock, paper, scissors game and every time you play without
> exiting, it chooses the same number. How can I fix this problem? The
> relative code is below:
[...]
>         compchoice = choice(range(3))
[...]

>>> range(3)
[0, 1, 2]

You either have to change your if-case ranges from 1-3 to 0-2, or
simply add one to the "compchoice" variable.


-- 
- Rikard.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to