Created
April 25, 2017 18:56
-
-
Save benevidesh/7c750980fd1df3e08c02364994cb6078 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numeroDoUsuario = int(input('Digite um número: ')) | |
divisor = 2 | |
Primo = True | |
while divisor < numeroDoUsuario and Primo: | |
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