Binary to Hexadecimal conversion in Python

Source code :

binary = input("Enter number in Binary Format: ")
temp = int(binary,2)
print(binary,"in Hexadecimal =",hex(temp))

Output :

Enter number in Binary Format: 110100
110100 in Hexadecimal = 0x34

Output :


                

Comments :