Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_prime (x):
- if x == 1 :
- return False
- elif x == 2 :
- return True
- elif x == 0 :
- return False
- elif x % 2 ==0 and x >2:
- return False
- elif x % 3 == 0 and x >3:
- return False
- elif x % 5 == 0 and x >5:
- return False
- elif x % 7 == 0 and x >7:
- return False
- else :
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement