# Python code to convert from Binary to Hexadecimal using integer() and hexa()
def binaryTohexa(n):
    # convert binary to int
    num = int(input("Enter a binary number"), 2)
      
    # convert int to hexadecimal
    hexa_num = hex(num)
    print("Input:", num)
    return(hexa_num)

# results
print("Output:", (binaryTohexa('n')))
Input: 5461
Output: 0x1555