-
-
Save parzibyte/a438f12874621b0942cab909e74849cc to your computer and use it in GitHub Desktop.
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
decimal = 3722.24 | |
en_binario = decimal_a_cualquier_base(decimal, 2, "01") | |
en_octal = decimal_a_cualquier_base(decimal, 8, "01234567") | |
en_hexadecimal = decimal_a_cualquier_base(decimal, 16, "0123456789ABCDEF") | |
print(f"El decimal {decimal} es {en_binario} en binario, {en_octal} en octal y {en_hexadecimal} en hexadecimal") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment