help with this game

Dan Bishop danb_83 at yahoo.com
Tue Jul 20 04:11:41 EDT 2004


"Sean Ross" <sross at connectmail.carleton.ca> wrote in message news:<0ddKc.34838$TB3.1337328 at news20.bellglobal.com>...
... 
> Oh, and
> 
>     a = random.randint(1, 100)
> 
> should be
> 
>     a = random.randint(1, 101)
> 
> if you want people to guess a number between 1 and 100, inclusive.

random.randint(1, 100) _can_ return 100.  It's randrange that doesn't.



More information about the Python-list mailing list