测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A25040. 有如下python程序段:import random a=[0]*6 for i in range(1,6): tmp=random.randint(5,24) if tmp%2==0 or i%2==1: a[i]=a[i-1]+tmp print(a) 执行程序后,列表a的值可能是?( )

单选题 困难

题目描述

有如下python程序段:

import random
a=[0]*6
for i in range(1,6):
    tmp=random.randint(5,24)
    if tmp%2==0 or i%2==1:
        a[i]=a[i-1]+tmp
print(a)

执行程序后,列表a的值可能是?(    )

选项(单选)

上一题 下一题