mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7ad4dd07a2
commit
2d73603083
@ -14,7 +14,7 @@ def octal_to_binary(octal_number):
|
|||||||
for digit in octal_number:
|
for digit in octal_number:
|
||||||
if digit not in octal_digits:
|
if digit not in octal_digits:
|
||||||
raise ValueError("Invalid octal digit")
|
raise ValueError("Invalid octal digit")
|
||||||
|
|
||||||
binary_digit = ""
|
binary_digit = ""
|
||||||
value = int(digit)
|
value = int(digit)
|
||||||
for _ in range(3):
|
for _ in range(3):
|
||||||
@ -24,6 +24,8 @@ def octal_to_binary(octal_number):
|
|||||||
|
|
||||||
return binary_number
|
return binary_number
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
|
||||||
|
doctest.testmod()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user