conversions.decimal_to_octal

Convert a Decimal Number to an Octal Number.

Functions

decimal_to_octal(→ str)

Convert a Decimal Number to an Octal Number.

main(→ None)

Print octal equivalents of decimal numbers.

Module Contents

conversions.decimal_to_octal.decimal_to_octal(num: int) str

Convert a Decimal Number to an Octal Number.

>>> all(decimal_to_octal(i) == oct(i) for i
...     in (0, 2, 8, 64, 65, 216, 255, 256, 512))
True
conversions.decimal_to_octal.main() None

Print octal equivalents of decimal numbers.