对于序列numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],以下相关操作中哪一个得到的结果中包含数字6?A.>>> numbers[0: 5]B.>>> numbers[6]C.>>> numbers[5: -1]D.>>> numbers[-4: -1]

对于序列numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],以下相关操作中哪一个得到的结果中包含数字6?

A.>>> numbers[0: 5]

B.>>> numbers[6]

C.>>> numbers[5: -1]

D.>>> numbers[-4: -1]


参考答案和解析
>>> numbers[5: -1]

相关考题:

●试题四阅读以下说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。【说明】将一正整数序列{K1,K2,…,K9}重新排列成一个新的序列,新序列中,比K1小的数都在K1的前面(左面),比K1大的数都在K1的后面(右面),最后调用writeDat()函数的新序列输出到文件out.dat中。在程序中已给出了10个序列,每个序列有9个正整数,并存入数组a[10][9]中,分别求出这10个新序列。例:序列 {6,8,9,1,2,5,4,7,3}经重排后成为{3,4,5,2,1,6,8,9,7}【函数】#includestdio.h#includeconio.hvoid jsValue(int a[10][9]){int i,j,k,n,temp;int b[9];for(i=0;i10;i++){temp=a[i][0];k=8;n=0;for(j=8;j=0;j--){if(tempa[i][j]) (1) =a[i][j];if(tempa[i][j]) (2) =a[i][j];if(temp=a[i][j]) (3) =temp;}for(j=0;j9;j++)a[i][j]=b[j];}}void main(){int a[10][9]={{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},{8,2,1,9,3,5,4,6,7},{3,5,1,2,9,8,6,7,4},{4,7,8,9,1,2,5,3,6},{4,7,3,5,1,2,6,8,9},{9,1,3,5,8,6,2,4,7},{2,6,1,9,8,3,5,7,4},{5,3,7,9,1,8,2,6,4},{7,1,3,2,5,8,9,4,6}};int i,j;(4) ;for(i=0;i10;i++){for(j=0;j9;j++){printf("%d",a[i][j]);if( (5) )printf(",");}printf("\n");}getch();}

{0、2、1、4、3、9、5、8、6、7}是以数组形式存储的最小堆,删除堆顶元素0后的结果是()A.{2、1、4、3、9、5、8、6、7}B.{1、2、5、4、3、9、8、6、7}C.{2、3、1、4、7、9、5、8、6}D.{1、2、5、4、3、9、7、8、6}

下面的序列中图的序列是A.(3, 2, 0, 1, 5)B.(6, 3, 3, 2, 2)C.(4, 4, 2, 2, 5)D.(7, 6, 8, 4, 9, 5)

下列程序的功能是:将一正整数序列{K1,K2,…,K91重新排成一个新的序列。新序列中,比K1小的数都在K1的左面(后续的再向左存放),比KI大的数都在K1的右面(后续的再向右存放),从K1向右扫描。要求编写函数JsValue()实现此功能,最后调用函数writeDat()把新序列输出到文件out90.dat中。说明:在程序中已给出了.10个序列,每个序列中有9个正整数,并存入数组a[10][9]中,分别求出这 10个新序列。例如:序列排序前 {6,8,9,1,2,5,4,7,3}序列排序后 {3,4,5,2,1,6,8,9,7}注意:部分源程序已给出。请勿改动主函数main()和写函数writeDat()的内容。试题程序:includejsValue(int a[lO] [9]){}main(){int a[10] [9]={{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},{8,2,1,9,3,5,4,6,7},{3,5,1,2,9,8,6,7,4},{4,7,8,9,1,2,5,3,6},{4,7,3,5,1,2,6,8,9},{9,1,3,5,8,62,4,7}{2,6,1,9,8,35,7,4}{5,3,7,9,1,82,6,4}{7,1,3,2,5,89,4,6}};int i,j;jsValue(a);for(i=0;i<10;i++){for(j=0;j9;j++){printf("%d",a[i] [j]);if(j<=7) printf(",");}printf("\n");}writeDat(a);}writeDat(int ail0] [9]){FILE *fp;int i,j;fp=fopen("outg0.dat","w");for(i=0;i<10;i++){for(j=0;j<9;j++){fprintf(fp,"%d",a[i] [j]);if(j<=7) fprintf(fp,",");}fprintf(fp,"\n");}fclose(fp);}

已知一个图的顶点集V={1,2,3,4,5,6,7};边集E={()3,()5,()8,()10,()6,()15,()12,()9,()4,()20,()18,()25},用克鲁斯卡尔算法得到最小生成树,则在最小生成树中依次得到的各条边为()。A、(1,2)3,(4,6)4,(1,3)5,(1,4)8,(2,5)10,(4,7)20B、(1,2)3,(4,6)4,(1,3)5,(2,3)6,(1,4)8,(3,6)9C、(1,2)3,(1,3)5,(1,4)8,(4,6)4,(2,5)10,(4,7)20D、(1,2)3,(1,3)5,(1,4)8,(2,5)10,(4,6)4,(4,7)20

阅读以下说明和C代码,将应填入(n)处的字句写在对应栏内。【说明】将一正整数序列{K1,K2,…,K9}重新排列成一个新的序列,新序列中,比K1小的数都在K1的前面(左面),比K1大的数都在K1的后面(右面),最后调用writeDat()函数的新序列输出到文件out.dat中。在程序中已给出了10个序列,每个序列有9个正整数,并存入数组a[10][9]中,分别求出这10个新序列。例:序列{6,8,9,1,2,5,4,7,3}经重排后成为{3,4,5,2,1,6,8,9,7}【函数】include < stdio. h >include < conio. h >void jsValue( int a [10] [9] ){ int i,j,k,n,temp;int b[9];for(i=0;i<10;i++){ temp=a[i] [0];k=8;n=0;for(j=8;j=0;j--){ if(temp < a[i] [j]) (1)=a[i][j];if(temp >a[i] [j]) (2)=a[i][j];if(temp =a[i] [j]) (3)= temp;}for(j=0;j<9;j++) a[i][j] =b[j];}}void main( )int a[10] [9] = {{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},{8,2,1,9,3,5,4,6,7}, {3,5,1,2,9,8,6,7,4},{4,7,8,9,1,2,5,3,6}, {4,7,3,5,1,2,6,8,9},{9,1,3,5,8,6,2,4,7}, {2,6,1,9,8,3,5,7,4},{5,3,7,9,1,8,2,6,4}, {7,1,3,2,5,8,9,4,6}};int i,j;(4);for(i=0;i<10;i++) {for(j=0;j<9;j++) {printf("%d",a[i] [j] );if((5))printf(",");}printf(" \n" );}getch( );}

有以下程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

有以下程序:程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,1,4,3,6,5,8,7,0,9,C.0,9,8,7,6,5,4,3,2,1,D.0,1,2,3,4,5,6,7,8,9,

以下程序中函数sort的功能是对a所指数组中的数据进行由大到小的排序: float sort(int a[], int n) { int i, j, t; for(i=0; i<n-1; i++) for(j=i+1; j<n; j++) if(a[i]<a[j]){t=a[i]; a[i]=a[j]; a[j]=t; } } main() { int aa[10]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10), i; sort(aa[3], 5); for(i=0; i<10; i++)printf("% d", aa[i]); printf ("\n"); } 程序运行后的输出结果是______。A.1, 2, 3, 4, 5, 6, 7, 8, 9, 10B.10, 9, 8, 7, 6, 5, 4, 3, 2, 1C.1, 2, 3, 8, 7, 6, 5, 4, 9, 10D.1, 2, 10, 9, 8, 7, 6, 5, 4, 3

以下程序中,函数sort的功能是对a数组中的数据进行由大到小的排序。void sort(int a[],int n){ int i,j,t; for(i=0;in-1;i++) for(j=i+1;jn;j++) if(a[i]a[j]) { t=a[i];a[i]=a[j];a[j]=t;}}main(){ int aa[10]={1,2,3,4,5,6,7,8,9,10},i; sort(aa[3],5); for(i=0;i10;i++)printf("%d,",aa[i]); printf("\n");}程序运行后的输出结果是A.1,2,3,4,5,6,7,8,9,10B.10,9,8,7,6,5,4,3,2,1C.1,2,3,8,7,6,5,4,9,10D.1,2,10,9,8,7,6,5,4,3

下列程序的功能是:将一正整数序列{K1,K2,…,K9}重新排成一个新的序列。新序列中,比K1小的数都在K1的左面(后续的再向左存放),比K1大的数都在K1的右面(后续的再向右存放),从K1向右扫描。要求编写函数jsValue()实现此功能,最后调用函数writeDat()把新序列输出到文件out90.dat中。说明:在程序中已给出了10个序列,每个序列中有9个正整数,并存入数组a[10][9]中,分别求出这10个新序列。例如:序列排序前 {6,8,9,1,2,5,4,7,3}序列排序后 {3,4,5,2,1,6,8,9,7}注意:部分源程序已给出。请勿改动主函数main()和写函数writeDat()的内容。试题程序:include<stdio.h>jsValue(int a[10][9]){}main (){int a[10] [9]={{6,8,9,1,2,5,4,7,3},{3,5,8,9,1,2,6,4,7},{8,2,1,9,3,5,4,6,7},{3,5,1,2,9,8,6,7,4},{4,7,8,9,1,2,5,3,6},{4,7,3,5,1,2,6,8,9},{9,1,3,5,8,6,2,4,7},{2,6,1,9,8,3,5,7,4},{5,3,7,9,1,8,2,6,4},{7,1,3,2,5,8,9,4,6},};int i,j;jsValue (a);for (i=0;i<10; i++){for(j=0;j<9;j++){printf("%d",a[i] [j]);if(j<=7) printf(",");}printf ("\n");}writeDat (a);}writeDat (int a[10] [9]){FILE *fp;int i,j;fp=fopen ("out90.dat", "w");for (i=0;i<10; i++){for(j=0;j<9;j++){fprintf (fp, "%d", a [i] [j] );if (j<=7) fprintf (fp, ", ");}fprintf (fp, "\n");}fclose (fp);}

有以下程序main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; for(p=a;pa+10;p++) printf("%d,",*p);}程序运行后的输出结果是A.1,2,3,4,5,6,7,8,9,0, B.2,3,4,5,6,7,8,9,10,1, C.0,1,2,3,4,5,6,7,8,9, D.1,1,1,1,1,1,1,1,1,1,

有以下程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,l0,

以下程序中函数sort的功能足对a数组中的数据进行由大到小的排序 void sort(int a[],int n) {int i,j,t; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(a[i]<a[j]){t=a[i];a[i]=a[j];a[j]=t;} } main() {int aa[10]={1,2,3,4,5,6,7,8,9,10},i; sort(aa[3],5); for(i=0;i<10;i++)printf("%d,",aa[i]); printf("\n"); } 程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1 0,9,8,7,6,5,4,3,2,1,C.1,2,3,8,7,6,5,4,9,10,D.1,2,10,9,8,7,6,5,4,3,

下列程序的功能是:将一个正整数序列{K1, K2,…, K9}重新排列成一个新的序列。在新序列中,比K1小的数都在K1的前面(左面),比K1大的数都在K1的后面(右面)。要求编写函数jsValue()实现以上功能,最后调用函数writeDat(),将新序列输出到文件out.dat中。说明:程序中已给出了10个序列,每个序列中有9个正整数,并存入数组a[10][9] 中,分别求出这10个新序列。例如:序列{6, 8, 9, 1, 2, 5, 4, 7, 3}重排后为{3, 4, 5, 2, 1, 6, 8, 9, 7}。部分源程序已给出。请勿改动主函数main() 和写函数writeDat() 的内容。#includestdio.hvoid jsValue(int a[10][9]){ } void main(){ int a[10][9]={{6,8,9,1,2,5,4,7,3} {3,5,8,9,1,2,6,4,7} {8,2,1,9,3,5,4,6,7} {3,5,1,2,9,8,6,7,4} {4,7,8,9,1,2,5,3,6} {4,7,3,5,1,2,6,8,9} {9,1,3,5,8,6,2,4,7} {2,6,1,9,8,3,5,7,4} {5,3,7,9,1,8,2,6,4} {7,1,3,2,5,8,9,4,6} }; int i,j; jsValue(a); for(i=0;i10;i++){ for(j=0;j9;j++) { printf("%d",a[i][j]); if(j=7) printf(","); } printf("\n");}writeDat(a);}void writeDat(int a[10][9]){ FILE *fp; int i,j; fp=fopen("out.dat","w"); for(i=0;i10;i++){ for(j=0;j9;j++){ fprintf(fp,"%d",a[i][j]); if(j=7) fprintf(fp,","); } fprintf(fp,"\n");} fclose(fp);}

以下程序中函数sort的功能是对a所指数组中的数据进行由大到小的排序: void sort(int a[],int n) {int i,j,t; for(i=0;i<n-1;i++) for(j=i+1;i<n;j++) if(a[i]<a[j]) {t=a[i];a[i]=a[j];a[j]=t;} } main() {int aa[10]={1,2,3,4,5,6,7,8,9,10},i; sort(aa[3],5); for(i=0;i<10;i++) printf('%d,",aa[i]); printf("\n"); } 程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.1,2,3,8,7,6,5,4,9,10,D.1,2,10,9,8,7,6,5,4,3,

下列秸序在运行时输出的结果是( )。A. 1 3 5 7 9B. 9 7 5 3 1C. 1 2 3 4 5 6 7 8 9 10D. 10 9 8 7 6 5 4 3 2 1

有以下程序程序运行后的输出结果是( )。A.1,2,3.4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

有下列程序:程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,7,6,3,4,5,8,9,10,C.1,2,7,6,5,4,3,8,9,10,D.1,2,9,8,7,6,5,4,3,10,

有以下程序程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,1,4,3,6,5,8,7,0,9,SXB 有以下程序程序的运行结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,1,4,3,6,5,8,7,0,9,C.0,9,8,7,6,5,4,3,2,l,D.0,1,2,3,4,5,6,7,8,9,

设有初始序列(8,5,2,12,7,1,6,10,9,3,4,11),排序后产生新序列(4,5,2, 3,7,1,6,8,9,10,12,11),问采用的是下列哪一个排序算法一趟扫描的结果?( )A.堆排序B.初始步长为4的希尔排序C.二路归并排序D.以8为分界元素的快速排序

以下程序中函数f的功能是:当na9为1时,进行由小到大排序;当na9为0时,进行由大到小排序。程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.3,4,5,6,7,2,1,8,9,10,C.5,4,3,2,1,6,7,8,9,10,D.10,9,8,7,6,5,4,3,2,1,

有以下程序:程序运行后的输出结果是( )。A.2,3,1,6,8,7,5,4,10,9,B.3,4,2,7,9,8,6,5,11,10,C.2,4,3,9,12,12,11,11,18,9,D.1,2,3,6,8,7,5,4,10,9,

有以下程序:程序运行后的输出结果是( )。A.2,3,1,6,8,7,5,4,10,9,B.10,9,8,7,6,5,4,3,2,l,C.1,2,3,4,5,6,7,8,9,10,D.10,9,8,7,6,1,2,3,4,5,

以下程序的输出结果是( )。 A.1,2,3,4,5,6,7,8,9,10,B.1,2,3,4,10,12,14,16,9,10,SX 以下程序的输出结果是( )。A.1,2,3,4,5,6,7,8,9,10,B.1,2,3,4,10,12,14,16,9,10,C.1,2,6,8,10,12,7,8,9,10,D.1,2,6,8,10,12,14,16,9,10,

有以下程序:include main( ){int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p;for(p =a;p 有以下程序:#include <stdio. h>main( ){ int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p; for(p =a;p<a+10;p++) printf("%d," , *p); }程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,3,4,5,6,7,8,9,10,1,C.0,1,2,3,4,5,6,7,8,9,D.1,1,1,1,1,1,1,1,1,1,

以下所列酒店费用中,哪些项目与店长考核GOP率相关()?(1)营业成本(2)人力成本(3)营业税(4)所得税(5)维修保养费(6)能源费用(7)租金(8)营销费用(9)摊销费用(10)其他费用(11)城区管理费(12)非经营费用A、(1)(2)(3)(5)(6)(8)(9)(10)(12)B、(1)(2)(3)(4)(5)(6)(8)(9)(10)(11)C、(1)(2)(3)(5)(6)(8)(9)(10)(11)D、(1)(2)(3)(4)(5)(6)(9)(10)(12)

单选题若有以下程序#include void fun(int a[],int n){ int t,i,j; for(i=1;i  for(j=i+2;j   if(a[i]a[j])   {    t=a[i];    a[i]=a[j];    a[j]=t;   }}main(){ int c[10]={10,9,8,7,6,5,4,3,2,1},i; fun(c,10); for(i=0;i printf("");}则程序的输出结果是(  )。A2,9,4,7,6,5,8,3,10,1,B10,9,8,7,6,5,4,3,2,1,C10,1,8,3,6,5,4,7,2,9,D1,10,3,8,5,6,7,4,9,2,