On Sep 19, 12:15 pm, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > Okay, I caught one bug already myself: > > for y in range(3,(math.sqrt(x) + 1)): > > should be > > for y in range(3,(int(math.sqrt(x)) + 1)):
If you'd just search the archives, you would have found this: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b134b2235e9c19a6/34857fb0b0b2a4b5?lnk=gst&q=prime+number&rnum=1#34857fb0b0b2a4b5 And Google has many hits. Here's one example: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/366178 Mike -- http://mail.python.org/mailman/listinfo/python-list