Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- prime = True
- a = int(input())
- for b in range(2, int(math.sqrt(a) + 1)):
- if a % b == 0:
- prime = False
- continue
- if a <= 0 or a == 1:
- print("Not prime")
- elif prime:
- print("Prime")
- else:
- print("Not Prime")
Advertisement
Add Comment
Please, Sign In to add comment