mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
Apply suggestions from code review
This commit is contained in:
parent
761e1f7404
commit
2e91bcf5bd
@ -11,6 +11,7 @@ https://en.wikipedia.org/wiki/Octal
|
|||||||
def octal_to_binary(octal_number: str) -> str:
|
def octal_to_binary(octal_number: str) -> str:
|
||||||
"""
|
"""
|
||||||
Convert an Octal number to Binary.
|
Convert an Octal number to Binary.
|
||||||
|
|
||||||
>>> octal_to_binary("17")
|
>>> octal_to_binary("17")
|
||||||
'001111'
|
'001111'
|
||||||
>>> octal_to_binary("7")
|
>>> octal_to_binary("7")
|
||||||
@ -19,7 +20,6 @@ def octal_to_binary(octal_number: str) -> str:
|
|||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
ValueError: Non-octal value was passed to the function
|
ValueError: Non-octal value was passed to the function
|
||||||
|
|
||||||
>>> octal_to_binary("@#")
|
>>> octal_to_binary("@#")
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user