Skip to content

Commit f3097b4

Browse files
authored
Update README.md
1 parent 655efe1 commit f3097b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exercises/30-divisable-binary/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ divisible_binary("0100,0011,1010,1001")
2121
+ 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:
2222

2323
```py
24-
binary = 0101
25-
integer = int(binary, 2)
26-
print(integer) # Output: 5
24+
binary = '0101'
25+
decimal = int(binary, 2)
26+
27+
print(decimal) # Output: 5
2728
```

0 commit comments

Comments
 (0)