下列语句的执行结果是40。x = [4, 0, 7]y = str(x[0]) + str(x[1])print(y)
对
举一反三
- 下了语句的执行结果是11。x = [4, 0, 7]y = float(x[0] + x[2])print(y)
- 下列语句的执行结果是40。x=[4,0,7]y=str(x[0])+str(x[1])print(y)
- 以下语句输出的结果是()String str = ”123”;int x = 4, y = 5;str = str + x + y;System.out.println(str);
- 智慧职教: 以下语句输出的结果是什么? String str = "123"; int x = 4, y = 5; str = x + y + str; System.out.println(str);
- def fun(x,y): global x,y t=x x=y y=t x=0 y=1 fun(x,y) print(x,y) 结果是 1 0
内容
- 0
循环语句 “for(x=0,y=0;(y!=1)||(x<4);x++)”执行 次
- 1
下列语句与y=(x>;0?1:x<;0?-1:0);语句功能相同是( ) A: if (x) if(x>;0) y=1; else if(x<;0) y=-1;else y=0; B: y=-1; if(x>;0) y=1; else y=-1; C: if (x>;0) y=1; else if(x<;0) y=-1; else y=0; D: y=0; if(x>;=0) y=1;else if(x==0) y=0; else y=-1;
- 2
智慧职教: 以下循环语句的执行次数为: x=0 y=1 while(y and (x<4)): print("2") x+=1
- 3
下列for循环语句执行的次数是。for(x=0,y=0;(y=123)&&(x<4);x++);
- 4
表示下列分段函数的正确的C语言语句是?[img=130x65]1803bce86a99b5b.png[/img] A: if (x < 0) y = -1; else if (x > 0) y = 1; else y = 0; B: if (x < 0) y = -1; if (x = 0) y = 0; if (x > 0) y = 1; C: if (x < 0) y = -1; if (x == 0) y = 0; if (x > 0) y = 1; D: if (x <= 0) if (x < 0) y = -1; else y = 0; else y = 1;