Tim Peters <t...@python.org> added the comment:

?  I expect your code to return -1 about once per 7**4 = 2401 times, which 
would be about 400 times per million tries, which is what your output shows.

If you start with -5, and randint(1, 7) returns 1 four times in a row, r5 is 
left at -5 + 4 = -1.

----------
nosy: +tim.peters

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to