Created
March 8, 2015 15:59
-
-
Save OskarSigvardsson/9b320f7e4fa116b4be46 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
from math import sqrt | |
def is_prime(n): | |
for divisor in range(2, int(sqrt(n))+1): | |
if n % divisor == 0: | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment