i=sum=0whilei<4:sum+=ii=i+1print(sum)以上代码输出的结果为
查看答案
以下代码输出结果为()
A. 输出一个4
B. 输出4个4
C. 无限次输出4
D. 语法错误
for i in range(5):print(i)输出结果为()
A. 01234
B. 01234
C. 012345
D. 0,1,2,3,4,5
forxinrange(4):s1="Hello"ifx%2==0:s1=s1+"Python"ifx%3==0:continueprint(s1)else:print("end_loop")程序块输出结果为()
A. HelloHelloPython
B. HelloHelloPythonend_loop
C. HelloHelloHelloPythonHello
D. HelloHelloPythonHelloend_loop
forxinrange(1,4):s1="Hello"ifx%2==0:s1=s1+"Python"ifx%3==0:breakprint(s1)else:print("end_loop")程序块输出结果为()
A. 无任何输出
B. HelloHelloPython
C. HelloHelloPythonend_loop
D. HelloHelloPythonHelloend_loop