On 17/02/14 11:39, Marc Eymard wrote:
Hi Tutor,
The previous elements I sent to the mailing list were incomplete and
needs no answer from Tutor.
But you got several nonetheless.
Did you read them?
If so you will know that calling randint() does not change the two
xxx_range variables. It simply returns a random number as requested.
You will need to modify the range values yourself.
Hope this clarifies my previous email (see further down this note).
>>> import random
>>> low_range = -1
>>> high_range = 101
>>> random.randint(low_range + 1, high_range - 1)
56
>>> low_range
-1
>>> high_range
101*
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor