Apply suggestions from code review

This commit is contained in:
Tianyi Zheng 2023-08-20 05:36:17 -07:00 committed by GitHub
parent 761e1f7404
commit 2e91bcf5bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ https://en.wikipedia.org/wiki/Octal
def octal_to_binary(octal_number: str) -> str:
"""
Convert an Octal number to Binary.
>>> octal_to_binary("17")
'001111'
>>> octal_to_binary("7")
@ -19,7 +20,6 @@ def octal_to_binary(octal_number: str) -> str:
Traceback (most recent call last):
...
ValueError: Non-octal value was passed to the function
>>> octal_to_binary("@#")
Traceback (most recent call last):
...