Skip to content

Instantly share code, notes, and snippets.

@eldondev
Last active December 22, 2015 12:19
Show Gist options
  • Save eldondev/6471470 to your computer and use it in GitHub Desktop.
Save eldondev/6471470 to your computer and use it in GitHub Desktop.
import math
number = 2000
accumulator = []
for a in range(2,number):
prime = True
for b in range(2,int(math.sqrt(a))):
if a % b == 0:
prime = False
if prime:
accumulator.append(a)
print accumulator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment