下列说法错误的是( )。知识点:函数
未知类型:{'options': ['已知元组列表x=[(2,3,10),(1,2,3),(2,6,7),(3,5,10)],那么sorted(x, key=lambda item : item[0]+item[2])排序后,print(x)的输出结果是:[(1, 2, 3), (2, 6, 7), (2, 3, 10), (3, 5, 10)]', "已知num=[2,3,4,5], print('*'.join(map(str, num)))的输出结果是:2*3*4*5", '已知x=[5, 2, 3, 4, 9],那么执行代码x = sorted(x[0::2], reverse=True)之后,x的值为[9,5,3]', '下面代码定义了求解[img=80x42]17de930c3fac9cf.png[/img]的函数,并计算x=9的取值import mathdef log3(x): return math.log(x)/math.log(3)f = log3print(f(9))'], 'type': 102}
未知类型:{'options': ['已知元组列表x=[(2,3,10),(1,2,3),(2,6,7),(3,5,10)],那么sorted(x, key=lambda item : item[0]+item[2])排序后,print(x)的输出结果是:[(1, 2, 3), (2, 6, 7), (2, 3, 10), (3, 5, 10)]', "已知num=[2,3,4,5], print('*'.join(map(str, num)))的输出结果是:2*3*4*5", '已知x=[5, 2, 3, 4, 9],那么执行代码x = sorted(x[0::2], reverse=True)之后,x的值为[9,5,3]', '下面代码定义了求解[img=80x42]17de930c3fac9cf.png[/img]的函数,并计算x=9的取值import mathdef log3(x): return math.log(x)/math.log(3)f = log3print(f(9))'], 'type': 102}
举一反三
- 下列说法错误的是( )。知识点:函数 A: 已知元组列表x=[(2,3,10),(1,2,3),(2,6,7),(3,5,10)],那么sorted(x, key=lambda item : item[0]+item[2])排序后,print(x)的输出结果是:[(1, 2, 3), (2, 6, 7), (2, 3, 10), (3, 5, 10)] B: 已知num=[2,3,4,5], print('*'.join(map(str, num)))的输出结果是:2*3*4*5 C: 已知x=[5, 2, 3, 4, 9],那么执行代码x = sorted(x[0::2], reverse=True)之后,x的值为[9,5,3] D: 下面代码定义了求解[img=80x42]18032de31cc0093.png[/img]的函数,并计算x=9的取值import mathdef log3(x): return math.log(x)/math.log(3)f = log3print(f(9))
- 如下函数的返回值是___________def test(): temp=[1,2,3,4,5,6,7,8,9,10] return [x for x in temp if x%3==2] A: [2, 5, 8] B: [1, 3, 6] C: [3, 6, 9] D: [1, 4, 7]
- 已知列表 x = ['1', '2'],那么执行语句 x.append(['3']) 之后,x 的值为 ( ) A: ['1', '2', '3'] B: ['1', ''2, ['3']] C: ['1'] D: ['3']
- 阅读程序。程序运行结果是: L=[-2,7,-3,4,9] print(sorted(L,key=lambda x:abs(x))) A: A.[-3, -2, 4, 7, 9] B: B.[-2, -3, 4, 7, 9] C: [2,3,4,7,9] D: [3,2,4,7,9]
- 以下程序的输出结果是: frame = [[1,2,3],[4,5,6],[7,8,9]] rgb = frame[::-1] print(rgb) A: [[7, 8, 9]] B: [[1,2,3],[4,5,6],[7,8,9]] C: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] D: [[1, 2, 3], [4, 5, 6]]