Re: [Tutor] My number-guessing program

2006-10-02 Thread John Fouhy
On 03/10/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote: > Note that the random.randint function includes both endpoints (I.E. the > numbers are 1-10 including 10) > but the range() function doesn't include the last endpoint. Which is why (in my not-so-humble opinion :-) ) we should tell people t

Re: [Tutor] My number-guessing program

2006-10-02 Thread Luke Paireepinart
> > > My line: number = 3 > Would I use 'number = random.randint()' in place of that, to have the > relevant number be random? yes, but remember that random.randint takes 2 arguments, the endpoints. E.G. random.randint(1,10) would be equivalent to random.choice(range(1,11)) or random.choice([1,2,

Re: [Tutor] My number-guessing program

2006-10-02 Thread Alan Gilfoy
Yeah, that's what the wiki-based tutorial mentioned. In fact, Lee Harr (my community adviser) also suggested using a random number. Quoting Luke Paireepinart <[EMAIL PROTECTED]>: > Alan Gilfoy wrote: (the start of the code for my number-guessing thingamajig) >> >> else: >>print "The number-gu