Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input("enter number to check: "))
- def is_prime(n):
- for i in range(2,n):
- if n%i == 0:
- return False
- return True
- result = is_prime(a)
- if result == False:
- print("not prime")
- else:
- print("prime")
Advertisement
Add Comment
Please, Sign In to add comment