如下代码运行后的输出结果是()。 ls = list(range(6)) ls.append(8) print(ls) A: [1, 2, 3, 4, 5, 6, 8] B: [0, 1, 2, 3, 4, 5, 8] C: [8, 1, 2, 3, 4, 5, 6] D: [8, 0, 1, 2, 3, 4, 5]
如下代码运行后的输出结果是()。 ls = list(range(6)) ls.append(8) print(ls) A: [1, 2, 3, 4, 5, 6, 8] B: [0, 1, 2, 3, 4, 5, 8] C: [8, 1, 2, 3, 4, 5, 6] D: [8, 0, 1, 2, 3, 4, 5]
list(range(-1,10,2)) A: [0, 2, 4, 6, 8, 10] B: [-1, 1, 3, 5, 7, 9] C: [0, 2, 4, 6, 8]
list(range(-1,10,2)) A: [0, 2, 4, 6, 8, 10] B: [-1, 1, 3, 5, 7, 9] C: [0, 2, 4, 6, 8]
>>>x= [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9]>>>print(x.sort()) 语句运行结果正确的是( )。 A: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] B: [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9] C: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] D: ['2', '4', '0', '6', '10', '7', '8', '3', '9', '1', '5']
>>>x= [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9]>>>print(x.sort()) 语句运行结果正确的是( )。 A: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] B: [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9] C: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] D: ['2', '4', '0', '6', '10', '7', '8', '3', '9', '1', '5']
执行下列代码后,数组的值是?[img=389x159]17e0b3a13c82cf0.png[/img] A: 一维数组{1, 4, 3, 2, 1, 0} B: 一维数组{1, 8, 0, 1, 2, 3, 4, 6, 2} C: 一维数组{1, 4, 3, 2, 1, 0, 8, 6, 2} D: 一维数组{1, 8, 0, 1, 2, 2, 9}
执行下列代码后,数组的值是?[img=389x159]17e0b3a13c82cf0.png[/img] A: 一维数组{1, 4, 3, 2, 1, 0} B: 一维数组{1, 8, 0, 1, 2, 3, 4, 6, 2} C: 一维数组{1, 4, 3, 2, 1, 0, 8, 6, 2} D: 一维数组{1, 8, 0, 1, 2, 2, 9}
用某种方法排序,调整序列如下,所选排序方法为( )。7 4 2 8 1 0 6 30 4 2 8 1 7 6 30 1 2 8 4 7 6 30 1 2 8 4 7 6 30 1 2 3 4 7 6 80 1 2 3 4 7 6 80 1 2 3 4 6 7 80 1 2 3 4 6 7 8
用某种方法排序,调整序列如下,所选排序方法为( )。7 4 2 8 1 0 6 30 4 2 8 1 7 6 30 1 2 8 4 7 6 30 1 2 8 4 7 6 30 1 2 3 4 7 6 80 1 2 3 4 7 6 80 1 2 3 4 6 7 80 1 2 3 4 6 7 8
set1 = {x for x in range(10)} print(set1) 以上代码的运行结果为? A: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} B: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10} C: {1, 2, 3, 4, 5, 6, 7, 8, 9} D: {1, 2, 3, 4, 5, 6, 7, 8, 9,10}
set1 = {x for x in range(10)} print(set1) 以上代码的运行结果为? A: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} B: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10} C: {1, 2, 3, 4, 5, 6, 7, 8, 9} D: {1, 2, 3, 4, 5, 6, 7, 8, 9,10}
已知x(n)={1, 2, 3},y(n)={1, 2, 1},则x(n)*y(n)=________。(下划线表示n=0) A: {1, 4, 8, 8, 3} B: {1, 4, 8, 8, 3} C: {1, 4, 8, 8, 3} D: {1, 4, 8, 8, 3}
已知x(n)={1, 2, 3},y(n)={1, 2, 1},则x(n)*y(n)=________。(下划线表示n=0) A: {1, 4, 8, 8, 3} B: {1, 4, 8, 8, 3} C: {1, 4, 8, 8, 3} D: {1, 4, 8, 8, 3}
“[ 2*x+2 for x in range(5) ]”生成的列表是( )。 A: [2, 4, 6, 8, 10] B: [0, 2, 4, 6, 8] C: [1, 2, 3, 4, 5] D: [0, 1, 2, 3, 4]
“[ 2*x+2 for x in range(5) ]”生成的列表是( )。 A: [2, 4, 6, 8, 10] B: [0, 2, 4, 6, 8] C: [1, 2, 3, 4, 5] D: [0, 1, 2, 3, 4]
下面语句的输出结果是?range(len('HelloWorld')) A: [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11] B: 11 C: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] D: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
下面语句的输出结果是?range(len('HelloWorld')) A: [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11] B: 11 C: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] D: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
not 1 or 0 and 1 or 3 and 4 or 5 and 6 or 7 and 8 and 9的值为
not 1 or 0 and 1 or 3 and 4 or 5 and 6 or 7 and 8 and 9的值为