Binary to decimal conversion in Python

Source code :

binary  = input("Enter number in Binary Format: ")
decimal = int(binary, 2)
print(binary,"in Decimal =",decimal)

Output :

enter the binary format::1010
1010 in Decimal = 10

Output :


                

Comments :