Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 9, 2020 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7c706699f16547edf8610ecd1823304d to your computer and use it in GitHub Desktop.
Save parzibyte/7c706699f16547edf8610ecd1823304d to your computer and use it in GitHub Desktop.
def decimal_a_octal(decimal):
octal = ""
while decimal > 0:
residuo = decimal % 8
octal = str(residuo) + octal
decimal = int(decimal / 8)
return octal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment