Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numero = int(input("Digite o numero para verificar se é PRIMO ou NÃO: "))
- def eh_primo(numero):
- total = sum(numero % c == 0 for c in range(1, numero+1))
- print('O numero {} foi divido {} vezes'.format(numero, total))
- return total == 2
- print(eh_primo(numero))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement