举一反三
- 已知a=[[1,2,3],[2,2],[3,2,1]],则a[1][1]+a[-1][-1]结果是 A: 1 B: 2 C: 3 D: 4
- 设集合A={1,2,3,4}的二元关系R={[1,1],[2,2],[3,3],[4,4]},S={[1,3],[2,4],[3,1],[4,2]},则R°S的对称闭包= 。
- 关于二维数组的创建,以下做法正确的是:(1)int a[][] =new int[4][5](2)int a[][] =new int[4][]; a[0]=new int[10]; a[1]=new int[20];(3)int a[][]; a=new int[3][]; a[0]=new int[3]; a[1]={1,2};a[2]={1,2,3}; A: (1)(2)(3) B: (1)(2) C: (1)(3) D: (1)
- 以下代码的显示结果是什么? data=[[[1,2],[3,4]],[[5,6],[7,8]]] print(data[1][0][0]) A: 1 B: 2 C: 4 D: 5 E: 6
- A=[1,2,3;4:6;7:9]; C=[A;[10,11,12]], D=C(1:3,[2 3]) E=C(2,[1 2]) E=(__________________)
内容
- 0
设有如下定义和语句[1] char *s; s="string";[2] char s[7]; s="string";[3] char s[ ]="string";[4] char s[ ]={'s','t','r','i','n','g'};其中定义项可以作为字符串使用的是______。 A: [1]和[2] B: [1]和[3] C: [1]和[4] D: [3]和[4]
- 1
已知列表m=[[1,2],[3,4]],有列表a=[[row[i] for row in m] for i in range(2)],则a[0][1]是[/i]
- 2
Convertible has two kinds: one is a hard-top convertible whose roof is made of metal,the other is a soft-top convertible whose roof is made of canvas (see Fig.7-7).
- 3
以下对二维数组的定义中错误的是()。A.inta[4][]={1,2,3,4,5,6};B.inta[][3];C.inta[][3]={1,2,3,4,5,6};D.inta[2][]={{1,2,3},{4,5,6}};
- 4
ls=[ [1,2,3,4],['a','b','c','d'],['列','表'] ][br][/br] 请写出结果: ls[0] (1) ls[0][0] (2) ls[1][0:2] (3)