语句()会一直不停循环下去。
A: for
a in range(10):
pass
B: while
2<10:
pass
C: while
True:
break
D: a=[3,-1,',']
for
i in a[:]:
if
not a:
break
A: for
a in range(10):
pass
B: while
2<10:
pass
C: while
True:
break
D: a=[3,-1,',']
for
i in a[:]:
if
not a:
break
举一反三
- 以下while循环的循环次数是__1__。[br][/br]i=0[br][/br]while(i[10):<br] if(i[1):continue<br] if(i==5):break[br][/br] i+=1
- The number of while is______。[br][/br]main()[br][/br]{ int i=0;[br][/br] while(i[10)<br]{ [br][/br] if (i[1) continue;<br] if (i==5) break;[br][/br] i++;[br][/br]} A: 1 B: 10 C: 6 D: endless
- 以下能正确计算1*2*3*……*10的程序段是( )。 A: do<br>{<br>i=1; s=1;<br>s*=i;<br>i++;<br>} while(i<=10); B: do<br>{<br>i=1; s=0;<br>s*=i;<br>i++;<br>} while(i<=10); C: i=1; s=1;<br>do<br>{<br>s*=i;<br>i++;<br>} while(i<=10); D: i=1; s=0;<br>do<br>{<br>s*=i;<br>i++;<br>} while(i<=10);
- 下列语句的执行结果是() a = 1 for i in range(5): if i == 2:[br][/br] break[br][/br] a += 1[br][/br] else: a += 1[br][/br] print(a) A: 2 B: 3 C: 4 D: 5
- 该程序的运行结果是____:[br][/br] i = 0[br][/br]while True: [br][/br] i = i +1 [br][/br] if i == 2: [br][/br] print____ [br][/br] continue [br][/br] if i == 5: [br][/br] print____ [br][/br] break [br][/br] print____[br][/br]print____[br][/br]____