def hex_bin_dec(): print("\n\nInput one known value\n") h=input("Hexadecimal: ") n=int(h,16) if h else 0 if not n: b=input("Binary: ") n=int(b,2) if b else 0 if not n: d=input("Decimal: ") n=int(d) if d else 0 print("Hex: ","0x{:X}".format(n)) print("Bin: ","0b{0:b}".format(n)) print("Dec: ",n)