Skip to content

Instantly share code, notes, and snippets.

@gncll
Last active August 13, 2022 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gncll/c8134128c4fb962f4a7cd00ae473c509 to your computer and use it in GitHub Desktop.
Save gncll/c8134128c4fb962f4a7cd00ae473c509 to your computer and use it in GitHub Desktop.
for i in prime:
for y in range(2, i):
if (i % y) == 0:
print("{} is not a prime number, because {} is a divider of {}".format(i, y, i))
break
if y == i -1:
print("{} is a prime number".format(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment