当前位置: 高中信息技术 / 填空题
  • 1. (2022高二上·浙江月考) 某Python程序段如下:

    def isdigit(x):

    if "0" <= x <= "9":

    return True

    else:

    return False

    d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    s = "1*8%6$3@0#19&0"

    ans = ""

    t = 0

    for i in s:

    if isdigit(i):

    t = t * 10 + int(i)

    else:

    ans += d[t]

    t = 0

    print(ans)

    运行该程序段,输出结果是

微信扫码预览、分享更方便