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))
      
      Python language logo

      Hexa to Decimal

      beginner
      inbuiltFunction
      logic

      Python Program to convert Decimal to Hexadecimal using While loop

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.