已知m=0,以下程序段的输出结果为:for i in range(1,8,2): for j in range(3,10,2): m+=1;print(m);
A: 15;
B: 16;
C: 5;
D: 6
A: 15;
B: 16;
C: 5;
D: 6
举一反三
- 已知m=0,以下程序段的输出结果为:for i in range(5): for j in range(10): m+=1;print(m); A: 15; B: 50; C: 5; D: 10
- 下列代码的运行结果为( ) m = 1 for x in range(1,4,2): m *= x print(m) A: 24 B: 6 C: 3 D: 1 2 6 24
- 下列程序的执行结果是( ).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
- 有如下程序段: Dim i%, j%, n%, m%, k% m = 0 : k = 0 For i = 1 To 5 k = k + 1 n = 0 For j = 1 To 2 n = n + 1 m = m + 1 Next j Next i MsgBox(k & " " & n & " " & m)运行该程序代码段后,消息对话框中显示的内容为( )。 A: 5 10 2 B: 5 10 10 C: 5 2 10 D: 5 2 2
- 以下程序的输出结果是___________。for i in range(1,11): print(i, end = " ") A: 1 2 3 4 5 6 7 8 9 B: 1 2 3 4 5 6 7 8 9 10 C: 1 2 3 4 5 D: 1 3 5 7 9