下面代码中输出结果为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)
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 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)
- 下面代码中输出结果为1,2,3三个数字的有()。 A: i=1 while i<3: print(i) <br> i+=1 B: i=3 while i>0: i=i-1 <br> print(3-i) C: for i in range(3): <br> print(i) D: alist=[0,1,2] for i in alist: <br> print(i+2)
- 下面代码中输出结果为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: i=1 whilei<3: print(i) i+=1 B: alist=[0,1,2] foriinalist: print(i+1) C: i=3 whilei>0: i=i-1 print(3-i) D: foriinrange(3): print(i)
- 下面的代码,哪些是输出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)