下面代码中输出结果为1,2,3三个数字的有()。
A: i=1 while i<3: print(i)
i+=1
B: i=3 while i>0: i=i-1
print(3-i)
C: for i in range(3):
print(i)
D: alist=[0,1,2] for i in alist:
print(i+2)
A: i=1 while i<3: print(i)
i+=1
B: i=3 while i>0: i=i-1
print(3-i)
C: for i in range(3):
print(i)
D: alist=[0,1,2] for i in alist:
print(i+2)
举一反三
- 下面代码中输出结果为1,2,3三个数字的有()。 A: for i in range(3): print(i) B: alist=[0,1,2] for i in alist: print(i+1) C: i=1 while i<3: print(i) i+=1 D: for i in range(3,0,-1): print(i+1) E: i=3 while i>0: i=i-1 print(3-i)
- 下面代码中输出结果为0、1、2三个数字的有(_____)。 A: for i in range(3): print(i) B: i=1 while i<3: print(i) i+=1 C: i=3 while i>1: i=i-1 print(3-i) D: for i in range(3,0,-1): print(3-i)
- 语句()会输出1、2、3三个数字。 A: for a in range(3):<br/>print(a) B: i=1<br/>while<br/>i<3:<br/>print(i)<br/>i+=1 C: aList=[1,2,3]<br/>for<br/>i in range(3):<br/>print(aList[i]) D: alist=[2,1,1,6,2,3,5,3,1,7]<br/>for<br/>x in alist[-3::-3]:<br/>print(x)
- 下面代码中输出结果为3,2,1三个数字的有()。 A: alist=[3,2,1] for i in alist: print(i) B: i=3 while i>0: print(i) i=i-1 C: for i in range(3,0,-1): print(i) D: for i in range(3): print(i) E: i=1 while i<3: print(i) i=i+1
- 下面的代码,哪些是输出1,2,3三个数字 ( )。 A: for i in range(3): print(i) print(i+1) B: aList = [0,1,2] for i in aList: print(i+1) C: i = 1 while i < 3: print(i) i+=1 D: for i in range(3): print(i+1)