-
-
Save parzibyte/cb7389fba912e3d133f6a79fdbe76ed2 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
def convertir(numero, base_destino): | |
if base_destino == "2": | |
return conversiones.decimal_a_binario(numero) | |
elif base_destino == "8": | |
return conversiones.decimal_a_octal(numero) | |
elif base_destino == "10": | |
return int(numero) | |
elif base_destino == "16": | |
return conversiones.decimal_a_hexadecimal(numero) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment