Skip to content

Commit 31dd906

Browse files
authored
Update README.md
1 parent a808b91 commit 31dd906

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

exercises/30-divisable-binary/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@
77
## 📎 Example input:
88

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

1313
## 📎 Example output:
1414

1515
```py
1616
1010
1717
```
18+
19+
## 💡 Hint:
20+
21+
+ To convert binary numbers into our everyday integer numbers (base 10 or decimal), you have to include the base of the number we input in the first argument (in this case, base 2 or binary), and the function `int()` will take care of the rest. Like this:
22+
23+
```py
24+
binary = 0101
25+
integer = int(binary, 2)
26+
print(integer) # Output: 5
27+
```

0 commit comments

Comments
 (0)