已知有n个数据进行排序,下面能实现排序的是
A: data=[34,5,-6,12,87,29]data.sort()
B: data=[34,5,-6,12,87,29]n=len(data)od=[]whileiwhilejifdata[j]>data[j+1]:t=data[j]data[j]=data[j+1]data[j+1]=tj+=1i+=1
C: data=[34,5,-6,12,87,29]n=len(data)i=0j=0whileiwhilejifdata[j]>data[j+1]:t=data[j]data[j]=data[j+1]data[j+1]=tj+=1i+=1print(data)
D: data=[34,5,-6,12,87,29]n=len(data)i=0j=0whileiwhilejifdata[i]>data[j]:t=data[i]data[i]=data[j]data[j]=tj+=1i+=1
A: data=[34,5,-6,12,87,29]data.sort()
B: data=[34,5,-6,12,87,29]n=len(data)od=[]whileiwhilejifdata[j]>data[j+1]:t=data[j]data[j]=data[j+1]data[j+1]=tj+=1i+=1
C: data=[34,5,-6,12,87,29]n=len(data)i=0j=0whileiwhilejifdata[j]>data[j+1]:t=data[j]data[j]=data[j+1]data[j+1]=tj+=1i+=1print(data)
D: data=[34,5,-6,12,87,29]n=len(data)i=0j=0whileiwhilejifdata[i]>data[j]:t=data[i]data[i]=data[j]data[j]=tj+=1i+=1
举一反三
- 下列选项中,能填入空白处5的代码是() A: mc.data[i][j] += data[k][j] * ma.data[i][k]; B: mc.data[i][j] += data[k][i] * ma.data[j][k]; C: mc.data[i][j] += data[j][k] * ma.data[k][i]; D: mc.data[i][j] += data[i][k] * ma.data[k][j];
- 下列DATA语句中正确的是() A: DATA B/4*1.0,4*2.0/ B: DATA((B(I,J), J=1,4), I=1,2)/4*1.0, 4*2.0/ C: DATA B/4*(1.0,2.0)/ D: DATA((B(I,J),I=1,2), J=1,4)/4*1.0, 4*2.0/
- 命令x=data(i, j)的含义为( )。
- 命令x=data(i, j)的含义为()。
- Suppose I have a data set called DATA and want to extract rows 1 to 10 and columns 5 to 7. What would be the relevant R command? A: DATA[1:10,5:7] B: DATA[5:7,1:10] C: DATA[10:1,7:5] D: DATA[7:5,10:1]