Created
May 18, 2018 12:41
-
-
Save Fhernd/211dc100b019233d4062b9fe619eee69 to your computer and use it in GitHub Desktop.
Representar valores enteros como binarios, octales o hexadecimales. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numero = 9876 | |
print(bin(numero)) | |
print(oct(numero)) | |
print(hex(numero)) | |
print('') | |
print(format(numero, 'b')) | |
print(format(numero, 'o')) | |
print(format(numero, 'x')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment