运行以下程序输出的结果是:( )。for i in range(6):if i%2==0:continueelif i%3:print(i,end=' ')else: print('end')
A: 1
B: 1 end
C: 1 5 end
D: 1 5
A: 1
B: 1 end
C: 1 5 end
D: 1 5
举一反三
- 下列程序的执行结果是( ).for i in range(2): print(i,end=' ' )for I in range(4,6): print(I,end=' ' ) A: 2 4 6 B: 0 1 2 4 5 6 C: 0 1 0 1 2 3 D: 0 1 4 5
- 阅读下面Python代码,选择正确输出结果:() for i in range(5): if i == 3: continue print(i,end=" ") continue print(i,end=" ") A: 0 1 2 3 4 5 B: 0 1 2 3 4 C: 2000 1 2 D: 0 1 2 4
- 执行下述代码:for i in range(5): if i <;= 2: i -= 1 print(i,end=',') elif i >; 2: i += 1 print(i,end=',')输出结果为() A: -1,0,1,4,5, B: -1,0,1,4, C: -1,0,4,1,5, D: -1,1,0,5,4,
- 运行如下程序,输出结果是 。 try: x, y = 1, 0 z = x / y print(0, end=",") except: print("1", end=",") else: print("2", end=",") finally: print("3", end=",")
- 下面代码的运行结果是: for i in range(2): print(i, end=') else: print(0)