forked from he4rt/he4rtoberfest-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b131a5
commit 1377977
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
challenges/3-conversao-de-base/python/grevizirsky/README.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**Exercicio:** 3 - Conversão de base | ||
|
||
**Nickname:** grevizirsky | ||
|
||
**Nível Técnico:** Junior | ||
|
||
**Empresa:** Nenhuma | ||
|
||
**Twitter**: https://twitter.com/braidiot | ||
|
||
**Dificuldade de Resolução:** - Baixa | ||
|
||
**Comentários:** | ||
|
||
**Como rodar o desafio**: | ||
|
||
Dentro do diretório do projeto, utilize o comando abaixo: | ||
|
||
```bash | ||
python dec_to_bin.py 7 | ||
``` |
6 changes: 6 additions & 0 deletions
6
challenges/3-conversao-de-base/python/grevizirsky/dec_to_bin.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import sys | ||
|
||
numero_dec = int(sys.argv[1]) | ||
numero_bin = bin(numero_dec)[2::] | ||
|
||
print(numero_bin) |