Created
September 23, 2016 14:35
-
-
Save xcv58/266c853a12bd45c00725ba9e5316a74f to your computer and use it in GitHub Desktop.
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): | |
for i in range(2, n/ 2 + 1): | |
if n % i is 0: | |
return False | |
return True | |
print [i for i in range(2, 100) if is_prime(i)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment