We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e790a90 commit e9a65c7Copy full SHA for e9a65c7
bit_manipulation/hamming_code_generator.py
@@ -83,7 +83,7 @@ def hamming_15_11(number: str) -> str:
83
84
return "".join([str(i) for i in hamming_digits])
85
86
- elif len(number) != 11 or not all(bit in '01' for bit in number):
+ else:
87
return "Input must be an 11-bit binary string containing only '0's and '1's."
88
89
if __name__ == "__main__":
0 commit comments