I am taking the MIT online course Introduction to Computer Science and
Programming. I have a assignment to write a program to compute and print the
1000th. prime number. Can someone give me some leads on the correct code?
Thanks, Ray
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 2009, at 9:44 AM, Ray Holt wrote:
I am taking the MIT online course Introduction to Computer Science
and Programming. I have a assignment to write a program to compute
and print the 1000th. prime number. Can someone give me some leads
on the correct code? Thanks, Ray
Copying
On Sat, 7 Nov 2009, sstein...@gmail.com wrote:
On Nov 7, 2009, at 9:44 AM, Ray Holt wrote:
I am taking the MIT online course Introduction to Computer Science and
Programming. I have a assignment to write a program to compute and print
the 1000th. prime number. Can someone
On Nov 7, 2009, at 9:44 AM, Ray Holt wrote:
I am taking the MIT online course Introduction to Computer Science and
Programming. I have a assignment to write a program to compute and
print
the 1000th. prime number. Can someone give me some leads on the
correct
On Sat, 7 Nov 2009, Raymond Hettinger wrote:
On Nov 7, 2009, at 9:44 AM, Ray Holt wrote:
I am taking the MIT online course Introduction to Computer
Science and Programming. I have a assignment to write a
program to compute and print the 1000th. prime number. Can
On Sun, Nov 8, 2009 at 12:44 AM, Ray Holt mrhol...@sbcglobal.net wrote:
I have a assignment to write a program to compute and print the 1000th.
prime number. Can someone give me some leads on the correct code?
Ray, if you really want an answer out of this list, you'll have to at least
show
On Nov 7, 11:23 am, Raymond Hettinger pyt...@rcn.com wrote:
On Nov 7, 2009, at 9:44 AM, Ray Holt wrote:
I am taking the MIT online course Introduction to Computer Science
and
Programming. I have a assignment to write a program to compute and
print
the 1000th.
Robert P. J. Day said:
the ubiquitous sieve of eratosthenes requires you to pre-specify
your maximum value, after which -- once the sieve completes -- all you
know is that you have all of the prime numbers up to n. whether
you'll have 1000 of them isn't clear, which means that you might have
On Sat, Nov 7, 2009 at 6:40 PM, Mensanator mensana...@aol.com wrote:
Tongue in cheek solution:
import urllib2
url = 'http://primes.utm.edu/lists/small/1.txt'
primes = []
for line in urllib2.urlopen(url).read().splitlines():
values = line.split()
if len(values) == 10:
On Sat, 7 Nov 2009 19:34:47 +0100, Andre Engels
andreeng...@gmail.com wrote:
On Sat, Nov 7, 2009 at 6:40 PM, Mensanator mensana...@aol.com wrote:
Tongue in cheek solution:
import urllib2
url = 'http://primes.utm.edu/lists/small/1.txt'
primes = []
for line in
10 matches
Mail list logo