Unsafe.
Unsafe.
Last edited by Rambo; 03-02-2014 at 02:42 PM.
Here's a way of ensuring no number is repeated twice:
Code:values = {'num1':0,'num2':0,'num3':0,'num4':0,'num5':0,'num6':0} for i in range(1, 7): rdint = randint(1, 25) while rdint in values.values(): rdint = randint(1, 25) values['num'+str(i)] = rdint
Thanks a bunch Zach!
Which version of python??
Python 2.7 looks like
Yes python 2.7 .
This is unsafe. I am taking it down, since I got banned for it.
KristinDeAnn13 (11-25-2014)