Hexa to Decimal

    0

    0

    Mahendra Kumar

    beginnerinbuiltFunctionlogic

    Python Program to convert Decimal to Hexadecimal using While loop

    def HexDecimal(n):  #user-defined function
        return int(n, 16)
    # take inputs
    num = input('Enter hexadecimal number: ')
    # calling function and display result
    print('The decimal value is =', HexDecimal(num))
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.