试题 试卷
题型:单选题 题类: 难易度:普通
浙江省嘉兴市海盐县2023-2024学年高二上学期信息技术10月阶段测试卷
①s[:4] ②s[-5:-1] ③s[:2]+s[3]*2 ④s[0:2]+s[3:5]
i = 1
Do While i<=6
a(i) = Int(Rnd * 10) + 1
If a(i) Mod 2 = i Mod 2 Then i = i + 1
Loop
For i = 1 To 2
k = 1
For j = 1 To 6 - i * 2
If a(j) * k > a(j + 2) * k Then
t = a(j): a(j) = a(j + 2): a(j + 2) = t
End If
k = -k
Next j
Next i
执行该程序段后,在下列选项中,a(1)~a(6)各元素值可能的是( )
lst = [2,5,2,1]
y = [1,1,1,1]
n = len(lst)
for i in range(①____):
for j in range(②____):
if ③____:
y[j] = y[j] + 1
else
y[i] = y[i] + 1
上述程序段3个划线处的表达式分别为( )
试题篮