conversions.octal_to_binary

References for better understanding: https://en.wikipedia.org/wiki/Binary_number https://en.wikipedia.org/wiki/Octal

Functions

octal_to_binary(→ str)

Convert an Octal number to Binary.

Module Contents

conversions.octal_to_binary.octal_to_binary(octal_number: str) str

Convert an Octal number to Binary.

>>> octal_to_binary("17")
'001111'
>>> octal_to_binary("7")
'111'
>>> octal_to_binary("Av")
Traceback (most recent call last):
    ...
ValueError: Non-octal value was passed to the function
>>> octal_to_binary("@#")
Traceback (most recent call last):
    ...
ValueError: Non-octal value was passed to the function
>>> octal_to_binary("")
Traceback (most recent call last):
    ...
ValueError: Empty string was passed to the function