Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement