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