📜  j - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:46.394000             🧑  作者: Mango

代码示例1
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")