重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 大学专科> 资源开发与测绘
网友您好,请在下方输入框内输入要搜索的题目:
搜题
拍照、语音搜题,请扫码下载APP
扫一扫 下载APP
题目内容 (请给出正确答案)
[主观题]

运行以下程序,输出结果为()。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): ls”相关的问题

第1题

有以下程序 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

点击查看答案

第2题

以下程序的功能是计算: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);

点击查看答案

第3题

有以下程序 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

点击查看答案

第4题

以下程序的输出结果为()。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')

点击查看答案

第5题

以下程序的输出结果为__________。 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); } }

点击查看答案

第6题

以下程序的输出结果为()。 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

点击查看答案

第7题

程序如下: 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,单击“确定”按钮后,输出结果为【 】。

点击查看答案

第8题

以下程序段的输出结果为_____。 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); } }

点击查看答案

第9题

有以下程序(注:字符a的ASCⅡ码值为97) main(){ char*S={abc); do{ printf(%d,*s%10); ++

有以下程序(注:字符a的ASCⅡ码值为97) main(){ char*S={abc); do{ printf(%d,*s%10); ++s;}while(*S);} 程序运行后的输出结果是

A.abc

B.7890

C.979899

D.789

点击查看答案

第10题

给出程序的运行结果#includeint main(){int a,b,s;char op;scanf("%d %c%d",&a,&op,&b);s=a%b;printf("s=%d",s);return 0;}程序运行时从键盘输入:15<回车>%5<回车>

A.0

B.程序报错

C.输出一个随机数

D.3

点击查看答案

第11题

以下程序的功能是对从键盘上输入的两个字符串进行比较,然后输出两个字符串中第一个不相同字符的A
SCII码值之差。请填空。 include"stdio.h" main() {char a1[20],a2[20]; int n=0,t; scanf("%st",a1); scanf("%s",a2); while(a1[n]!=a2[n]&&(a1[n]!=【 】)) {t=【 】; printf("%d\n",t); n++;} }

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝