Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def isPrime(n):
- if n==1: return False
- if n%2==0:
- if n==2: return True
- return False
- for i in range(3, math.floor(math.sqrt(n))+1, 2):
- if n%i==0: return False
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement