Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_prime(x):
- n = 2
- check = 0
- if x < 2:
- return False
- else:
- while n <= x:
- if x % n == 0:
- check+=1
- n+=1
- else:
- n+=1
- if check > 1 or check == 0:
- return False
- else:
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement