Skip to content

Commit 655efe1

Browse files
authored
Update README.es.md
1 parent 31dd906 commit 655efe1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

exercises/30-divisable-binary/README.es.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@
77
## 📎 Ejemplo de entrada:
88

99
```py
10-
divisible_binary(0100,0011,1010,1001)
10+
divisible_binary("0100,0011,1010,1001")
1111
```
1212

1313
## 📎 Ejemplo de salida:
1414

1515
```py
1616
1010
1717
```
18+
19+
## 💡 Pista:
20+
21+
+ Para convertir números binarios en nuestros números enteros cotidianos (base 10 o decimal), es necesario incluir la base del número que ingresamos en el primer argumento (en este caso, base 2 o binario), y la función `int()` se encargará del resto. Sería así:
22+
23+
```py
24+
binary = 0101
25+
decimal = int(binary, 2)
26+
27+
print(decimal) # Output: 5
28+
```

0 commit comments

Comments
 (0)