题目内容

如下程序的输出结果是:for i in "CHINA": for k in range(2): print(i, end="") if i == 'N': break

A. CCHHIINNAA
B. CCHHIIAA
CCHHIAA
D. CCHHIINAA

查看答案
更多问题

如下程序的输出结果是:x= 10while x: x -= 1 if not x%2: print(x,end = '')else: print(x)

A. 86420
B. 975311
C. 97531
D. 864200

如下程序的输出结果是:s=’’ls = [1,2,3,4]for l in ls:s += str(l)print(s)

A. 1,2,3,4
B. 4321
C. 4,3,2,1
D. 1234

如下程序的输出结果是: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]

答案查题题库