<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>
Hey all,<BR>
<BR>
I edited my code, and it seems to choose a new number each time. Maybe I didn't run my test long enough the first time?<BR>
<BR>
I should have spotted the problem of<BR>
<BR>
choice(range(3))<BR>
<BR>
a mile away. I edited that bit, and now I think it's running right. (25 rounds of Rock, Paper, Scissors should be good enough testing, right? LOL) The new code is<BR>
<BR>
choice(range(1,4))<BR><BR>and that was a suggestion. (Thanks!) But can anyone explain why I can shorten the code? I looked at it a long while yesterday, and came up with nothing. The only thing I decided was to try to get it to the GUI stage.<BR>
<BR>
Thanks,<BR>
Nathan<BR>
<DIV><BR>> Date: Wed, 14 Feb 2007 17:17:57 +0100<BR>> From: "Rikard Bosnjakovic" <rikard.bosnjakovic@gmail.com><BR>> Subject: Re: [Tutor] Why doesn't it choose a new number each time?<BR>> To: tutor@python.org<BR>> Message-ID:<BR>> <d9e88eaf0702140817s7e7ab8a0n44c8cd2e0e56d281@mail.gmail.com><BR>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR>> <BR>> On 2/14/07, Alan Gauld <alan.gauld@btinternet.com> wrote:<BR>> <BR>> > I don't think that's a problem. The fact that the computers numbers<BR>> > don't correspond with the users numbers shouldn't matter provided<BR>> > the 'if' tests align with the choice result, which they do.<BR>> <BR>> Alan,<BR>> <BR>> You're right, ofcourse. I approached the problem entirely<BR>> pragmatically and somehow disregarded the original problem.<BR>> <BR>> Nathan, you need to provide us more details. For example, what really<BR>> happens (which you consider being a problem), and what do you want to<BR>> happen instead?<BR>> <BR>> <BR>> --<BR>> - Rikard.<BR><BR></DIV></body>
</html>