Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 - Números primos - python #196

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions challenges/6-numeros-primos/python/davidspader/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# Submissão de Exercicio

**Exercicio:** 6 - Números primos

**Nickname:** davidspader

**Nível Técnico:** Junior

**Empresa:**

**Twitter**: https://twitter.com/xsplsh

**Dificuldade de Resolução:** - Baixa

**Comentários:**

**Como rodar o desafio**:

Dentro do diretório do projeto, utilize o comando abaixo:

```bash
python numeros-primos.py 2
```
13 changes: 13 additions & 0 deletions challenges/6-numeros-primos/python/davidspader/numeros-primos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from sys import argv

numero = int(argv[1])
total_divisao = 0

for i in range(1, numero + 1):
if(numero % i == 0):
total_divisao += 1

if total_divisao == 2:
print(True)
else:
print(False)