Skip to content

Instantly share code, notes, and snippets.

@israelem
Created February 14, 2018 12:42
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 israelem/1c563b9b2ed16a217e2f823dd858dccf to your computer and use it in GitHub Desktop.
Save israelem/1c563b9b2ed16a217e2f823dd858dccf to your computer and use it in GitHub Desktop.
numero = int(input("Escriba el número: "))
while numero >= 2:
divisor = 2
while numero % divisor != 0 and divisor <= numero // divisor:
divisor += 1
if numero % divisor != 0:
print("Es primo")
else:
print("No es primo")
numero = int(input("Escriba el número: "))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment