print([i for i in range(5)])
A: [0,1,2,3,4,5]
B: [0,1,2,3,4]
C: [1,2,3,4,5]
D: i
A: [0,1,2,3,4,5]
B: [0,1,2,3,4]
C: [1,2,3,4,5]
D: i
举一反三
- 阅读下面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(let i=0;i<5;i++){print(i);}print(i); A: 1 2 3 4 5 B: 0 1 2 3 4 C: referenceError:I is not defined D: 4
- 语句 for i in range(5) 中,每次循环时i的值为多少? A: 0 1 2 3 4 B: 1 2 3 4 5 C: 0 1 2 3 4 5 D: 1 2 3 4
- 下列代码段执行后的结果是()int[] a = { 1, 3, 5, 2, 4 };int j = 4;for (int i = 0; i <; 5; i++) { a[i] = a[j]; j--;}for (int i = 0; i <; 5; i++) System.out.print(a[i] + " ");[/i][/i] A: 1 2 3 4 5 B: 5 4 3 2 1 C: 4 2 5 2 4 D: 4 2 5 3 1
- 有一数组如下定义:int a[6]={1,2,3,4,5}; 执行for (i=0; i<6;i++) printf ("%d ",a[i]);后输出的结果是___________。[/i] A: 1 2 3 4 5 5 B: 1 2 3 4 5 6 C: 1 2 3 4 5 随机值 D: 1 2 3 4 5 0