📅  最后修改于: 2022-03-11 14:55:46.394000             🧑  作者: Mango
def hexConvert (x):
return int(x, base)
x = str(input("input value to convert to decimal: "))
base = int(input("Base of value to be converted to decimal: "))
print(x, " in base ", base, " = ", hexConvert(x), " in decimal")