Skip to content

Instantly share code, notes, and snippets.

@mdsami
Created August 15, 2016 18:39
Show Gist options
  • Save mdsami/3645edcba4d45c5b70d493f88f8e894c to your computer and use it in GitHub Desktop.
Save mdsami/3645edcba4d45c5b70d493f88f8e894c to your computer and use it in GitHub Desktop.
Prime number calculation with python in DIU-Cluster 10 nodes Raspberry pi
def is_prime(n):
status = True
if n < 2:
status = False
else:
for i in range(2,n):
if n % i == 0:
status = False
return status
for n in range(1,10001):
if is_prime(n):
if n==97:
print n
else:
print n,",",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment