Ashfaq,
On Sat, Dec 1, 2012 at 10:46 AM, Ashfaq <quazi.ash...@gmail.com> wrote: > Run your code 10,000 times. :) > > > ** ** >> >> import math**** >> >> import random**** >> >> random.seed()**** >> >> > there is no need to call seed() with no parameters. From the docs: """ If *x* is omitted or None, current system time is used; current system time is also used to initialize the generator when the module is first imported.""" So you see when you"import random" the random number generator will seed automatically with the system time. points = [] > for i in range(0, 10000): > > x=random.uniform(0,1) > > y=random.uniform(0,1) > > points.append ( (x, y) ) > Also you could use a generator for all these lines, points = [(random.uniform(0,1), random.uniform(0,1)) for i in range(10000)] -Luke
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor