Interview Question

Senior Software Engineer Interview Pune (India)

Write a program to find prime numbers between 1 to

  100000. primes = [] for x in range(1,100000): for y in range (2, x-1): if x % y == 0: break else: primes.append(x) print "Prime Numbers: ", primes NOW OPTIMIZE IT. (Yeilling)

Add Answers or Comments

To comment on this review, Sign In with Facebook or Sign Up