MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / main

Function main

conversions/decimal_to_octal.py:27–39  ·  view source on GitHub ↗

Print octal equivalents of decimal numbers.

()

Source from the content-addressed store, hash-verified

25
26
27def main() -> None:
28 """Print octal equivalents of decimal numbers."""
29 print("\n2 in octal is:")
30 print(decimal_to_octal(2)) # = 2
31 print("\n8 in octal is:")
32 print(decimal_to_octal(8)) # = 10
33 print("\n65 in octal is:")
34 print(decimal_to_octal(65)) # = 101
35 print("\n216 in octal is:")
36 print(decimal_to_octal(216)) # = 330
37 print("\n512 in octal is:")
38 print(decimal_to_octal(512)) # = 1000
39 print("\n")
40
41
42if __name__ == "__main__":

Callers 1

Calls 1

decimal_to_octalFunction · 0.85

Tested by

no test coverage detected