首页 > 公务员考试> 公务员(国考)
题目内容 (请给出正确答案)
[主观题]

以下程序的输出结果为()。s="AB123def" for i in s: print(i,end='') #本次

以下程序的输出结果为()。s="AB123def" for i in s: print(i,end='') #本次输出后不换行,后面的内容紧接着输出 if i.islower(): #字符串的islower方法用于判断字符串中的字母是否全为小写字母 print('yes') break else: print('no')

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“以下程序的输出结果为()。s="AB123def" for …”相关的问题
第1题
以下程序的输出结果为__________。 public class Short { public static void main (St

以下程序的输出结果为__________。 public class Short { public static void main (String args[ ]) { String Buffer s=new StringBuffer("Boy"); if ((s.length()<3)& &(s.append("男孩").equals("False"))) ; System.out.println("结果为:"+ s); } }

点击查看答案
第2题
以下程序的输出结果为()。 include<stdio.h> define PT 5.5 define S(x)PT*x*x

以下程序的输出结果为()。 include<stdio.h> define PT 5.5 define S(x)PT*x*x void main() { int a=1,b=2; printf("%5.1f\n",S(a+b)); )

A.12.0

B.9.5

C.12.5

D.33.5

点击查看答案
第3题
以下程序段的输出结果为_____。 class Cruncher{ void crunch(int i) { System.out.p

以下程序段的输出结果为_____。 class Cruncher{ void crunch(int i) { System.out.println("int"); } void crunch(String s){ System.out.println("String"); } public static void main(String args[]){ Cruncher crun=new Cruncher(); char ch="p": crun.crunch(ch); } }

点击查看答案
第4题
有以下程序 definePT3.5; defineS(x)PT*x*x; main(){ inta=l,b=2; printf(%4.1f\n,S(a+

有以下程序 definePT3.5; defineS(x)PT*x*x; main(){ inta=l,b=2; printf(%4.1f\n,S(a+b));} 程序运行后的输出结果是

A.31.5

B.7.5

C.程序有错无输出结果

D.14

点击查看答案
第5题
以下程序的功能是计算:s= 1+1/2+1/3+……+1/10,程序运行后输出结果错误,导致错误结果的程序行是()#includeint main(){int n;float s;s=1.0;for(n=10;n>1;n--){s=s+1/n;}printf("%6.4f\n",s);return 0;}

A.s=1.0;

B.for(n=10;n>1;n--)

C.s=s+1/n;

D.printf("%6.4f\n",s);

点击查看答案
第6题
有以下程序 include<stdio.h> yoidmain() { chars[]:{012xy};inti,n=0; for(i=0;s[i]!=

有以下程序 include<stdio.h> yoidmain() { chars[]:{012xy};inti,n=0; for(i=0;s[i]!=0;i++) if(s[i]>=a&&s[i]<==Z)n++; printf(%d\n,n); } 程序运行后的输出结果

A.0

B.3

C.5

D.2

点击查看答案
第7题
若输入this test terminal,以下程序的输出结果为:terminal test this。请填空。 define MAXLI
NE 20 【 】 { int i; char * pstr[3],str[3][MAXLINE]; for(i=0;i<3;+ +)pstr[i]=str[i]; for(i=0;i<3;i + +)scanf("%s",pstr[1]); sort(pstr); for(i=0;i<3;i+ +)prntf("%s",pstr[i]); } sort(【 】 ) char * pstr[3]; {int i,j; char * p; for(i=0;i<3;i+ +) for(j=i + 1;j<3;j + +) if(strcmp(* (pstr+i,* (pstr+j)>0 {p=* (pstr + i); * (pstr + i=【 】 ; * (pstr +j)=p; }

点击查看答案
第8题
写出下列程序段的输出结果(栈的元素类型SElemType为char)。 void main() { Stack S; char x,y; lnit

写出下列程序段的输出结果(栈的元素类型SElemType为char)。

void main()

{

Stack S;

char x,y;

lnitStack(S);

x='c';

y='k';

Push(S,x);

Push(S,'a');

Push(S,y);

Pop(S,x);

Push(S,'t');

Push(S,x);

Pop(S,x);

Push(S,'s');

While(!StackEmpty(S))

{

Pop(S,y);

printf(y);

}

printf(x);

}

点击查看答案
第9题
若输入3、4、5,程序的输出结果为【 】。 include "math.h" main () { float a,

若输入3、4、5,程序的输出结果为【 】。 include "math.h" main () { float a, b, c, s, area; scanf("%f,%f,%f",&a,&b,&c); s=1.0/2*(a+b+c); area=sqrt (s* (s-a) * (s-b) * (s-c)); printf ("a=%7.2f,b=%7.2f, c=%7.2f, s=%7.2f", a,b, c, s); printf ("area=%7.2f\n", area); }

点击查看答案
第10题
设有如下程序: Private Sub Form_Click() Dim a As Integer,s As Integer

设有如下程序: Private Sub Form_Click() Dim a As Integer,s As Integer n=8 S=0 DO S=S+n n=n-1 Loop While n>0 Print S End Sub 以上程序的功能是【 】。程序进行后,单击窗体,输出结果为【 】。

点击查看答案
第11题
程序如下: Private Sub Form_Click() Const PI=14159 Dim r As Single,S As S

程序如下: Private Sub Form_Click() Const PI=14159 Dim r As Single,S As Single R=InputBox("请输入圆的半径","输入数据","50") S = PI*r*r Print "S=";Format(S,",.") End Sub 程序运行后,单击窗体,将显示一个输入对话框,输入数据35,单击“确定”按钮后,输出结果为【 】。

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改