Skip to content

Instantly share code, notes, and snippets.

@benevidesh
Created April 25, 2017 15:09
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 benevidesh/550cf0b94b3e96d8fa5121672a64149c to your computer and use it in GitHub Desktop.
Save benevidesh/550cf0b94b3e96d8fa5121672a64149c to your computer and use it in GitHub Desktop.
numeroDoUsuario = int(input('Digite um número: '))
divisor = 2
Primo = True
while divisor < numeroDoUsuario:
if numeroDoUsuario % divisor == 0:
Primo = False
divisor += 1
if numeroDoUsuario == 1 or not Primo:
print('não primo')
else:
print('primo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment