Skip to content

Instantly share code, notes, and snippets.

@sameerg07
Created June 4, 2021 03:49
Show Gist options
  • Save sameerg07/0d08c57da55649ec1bb468a9dbbdc7df to your computer and use it in GitHub Desktop.
Save sameerg07/0d08c57da55649ec1bb468a9dbbdc7df to your computer and use it in GitHub Desktop.
Check if a number is prime in python
n=int(input())
#write your code here
if n%2 == 0 and n!=2 and n!=0:
print("number entered is not prime")
else:
print("number entered is prime")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment