试题

试题 试卷

logo

题型:单选题 题类: 难易度:困难

浙江省嘉兴市第五高级中学2023-2024学年高二上学期信息技术期中测试卷

有如下Python程序段:

import random

a = [34, 12, 93, 8, 14, 18, 24, 17, 51, 57]

num = random.randint(2, 3)

List = []

for i in range(len(a)):

    if a[i] % num == 0:

        List.append(a[i])

print(List)

执行该程序段后,输出的结果可能是(  )

A、[12, 93, 18, 24, 51, 57] B、[34, 12, 8, 14, 18, 0] C、[34, 12, 93, 8, 14, 18] D、[14, 18, 24, 17, 51, 57]
举一反三
返回首页

试题篮