运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): ls
运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): lst.append(s[i:i+2] ) print(lst[-3])
运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): lst.append(s[i:i+2] ) print(lst[-3])
第1题
有以下程序 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
第2题
A.s=1.0;
B.for(n=10;n>1;n--)
C.s=s+1/n;
D.printf("%6.4f\n",s);
第3题
有以下程序 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
第4题
以下程序的输出结果为()。s="AB123def" for i in s: print(i,end='') #本次输出后不换行,后面的内容紧接着输出 if i.islower(): #字符串的islower方法用于判断字符串中的字母是否全为小写字母 print('yes') break else: print('no')
第5题
以下程序的输出结果为__________。 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); } }
第6题
以下程序的输出结果为()。 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
第7题
程序如下: 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,单击“确定”按钮后,输出结果为【 】。
第8题
以下程序段的输出结果为_____。 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); } }
第9题
有以下程序(注:字符a的ASCⅡ码值为97) main(){ char*S={abc); do{ printf(%d,*s%10); ++s;}while(*S);} 程序运行后的输出结果是
A.abc
B.7890
C.979899
D.789
第10题
A.0
B.程序报错
C.输出一个随机数
D.3
第11题