Created
August 15, 2016 18:39
-
-
Save mdsami/3645edcba4d45c5b70d493f88f8e894c to your computer and use it in GitHub Desktop.
Prime number calculation with python in DIU-Cluster 10 nodes Raspberry pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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