如下程序的输出结果是:j = ‘’for i in “12345”:j += i + ‘,’print(j)
A. 1,2,3,4,5
B. 12345
C. ‘1,2,3,4,5,’
D. 1,2,3,4,5,
查看答案
如下程序的输出结果是:ls1 = [1,2,3,4,5]ls2 = [3,4,5,6,7,8]cha1 = []for i in ls2:if i not in ls1:cha1.append(i)print(cha1)
A. (6, 7, 8)
B. (1,2,6, 7, 8)
C. [1,2,6,7,8]
D. [6, 7, 8]
chr(21646)输入汉字“咎”,如下代码执行的输出结果是:for i in range(1,4): print(chr(21646)*(2*i-1))
A. 咎咎咎咎咎咎
B. 咎咎咎咎咎咎咎咎咎
C. 咎咎咎咎咎咎咎咎咎咎
D. 出错
给出下面代码:
A. = input("").split(",")x = 0while x < len(a):print(a[x],end="")x += 1代码执行时,从键盘得到“Python语言,是,脚本,语言”则代码的输出结果是执行代码出错
B. Python语言,是,脚本,语言
C. Python语言是脚本语言
D. 无输出
执行如下程序,输入”93python22”,输出结果是:w = input(‘请输入数字和字母构成的字符串:’)for x in w:if ‘0’<= x <= ‘9’:continueelse:w.replace(x,’’)print(w)
A. python9322
B. python
C. 93python22
D. 9322