Skip to content

Instantly share code, notes, and snippets.

@bharathmuddada
Last active May 26, 2021 10:32
Show Gist options
  • Save bharathmuddada/2d76ed929e3c7d354560829e36ac6e3a to your computer and use it in GitHub Desktop.
Save bharathmuddada/2d76ed929e3c7d354560829e36ac6e3a to your computer and use it in GitHub Desktop.
Prime Number check in python
n = int(input("Enter your number \n"))
if n <= 1:
print("No")
else:
for i in range(2, n):
if n % i == 0:
print("No")
break
else:
print("Yes")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment