Skip to content

Commit d2d7a11

Browse files
authored
Fix filename typos in binary to excess-3 conversion
1 parent 5ccc731 commit d2d7a11

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
def binary_to_excess3(binary_str: str) -> str:
22
"""
33
Convert a binary number (as a string) to its Excess-3 code.
4+
https://en.wikipedia.org/wiki/Excess-3
45
56
Args:
67
binary_str (str): Binary number as a string (e.g., "1010").
@@ -25,6 +26,9 @@ def binary_to_excess3(binary_str: str) -> str:
2526

2627

2728
if __name__ == "__main__":
29+
from dostest import testmod
30+
31+
testmod()
2832
binary_input = input("Enter a 4-bit binary number: ")
2933
excess3_output = binary_to_excess3(binary_input)
3034
print(f"Excess-3 code of {binary_input} is: {excess3_output}")

0 commit comments

Comments
 (0)