首页 / 客观题库

Q80222 - 2026编程挑战赛Python提高组22

题目( 单选题 )

下列代码运行结果正确的是:

from functools import reduce

def outer():

    x = 10

    def inner(y):

        return x + y

    return inner

f = outer()

lst = [1, 2, 3]

result1 = list(map(lambda x: x * 2, lst))

result2 = list(filter(lambda x: x > 2, lst))

result3 = reduce(lambda x, y: x + y, lst)

result4 = f(5)

print(result1)

print(result2)

print(result3)

print(result4)

A [2, 4, 6] [3] 6 15

B [2, 4, 6] [2, 3] 6 5

C [1, 2, 3] [3] 6 15

D [2, 4, 6] [3] 6 5

意见反馈

    最多上传3张图片,格式为JPG、PNG、JPEG,单张不超过5MB

    注册

    发送验证码

    密码必须包含数字、字母和特殊字符

    找回密码

    发送验证码

    密码必须包含数字、字母和特殊字符

    运行 ID:67149

    • 测试点1:Accepted
    • 用时:0 ms
    • 内存:288 kb
    • 测试点2:Accepted
    • 用时:0 ms
    • 内存:288 kb
    输入
    203
    输出
    203

    test

    测评信息

    错误.in文件下载

    错误.out文件下载

    运行 ID:67149

    2019-01-24 15:06:36