Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. numeroDoUsuario = int(input('Digite um número: '))
  2.  
  3. divisor = 2
  4.  
  5. Primo = True
  6.  
  7. while divisor < numeroDoUsuario:
  8. if numeroDoUsuario % divisor == 0:
  9. Primo = False
  10. divisor += 1
  11.  
  12. if numeroDoUsuario == 1 or not Primo:
  13. print('não primo')
  14. else:
  15. print('primo')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement