[Tutor] Inclusivity
David
bouncingcats at gmail.com
Sat Jun 13 20:29:20 EDT 2020
On Sun, 14 Jun 2020 at 08:43, Michael Deslippe <1611kjb at gmail.com> wrote:
> When generating a random integer, ala;
> myNum = random.randint(0, 1000000)
> Is the range of integers inclusive or exclusive of the seed values (eg. will the range of possible answers include or exclude 0 and 1000000)?
$ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> help(random.randint)
Help on method randint in module random:
randint(a, b) method of random.Random instance
Return random integer in range [a, b], including both end points.
>>>
More information about the Tutor
mailing list