Created
April 25, 2017 15:09
-
-
Save benevidesh/550cf0b94b3e96d8fa5121672a64149c 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: | |
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