试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省温州市十五校联合体2017 -2018学年高二上学期信息技术期中考试试题
Dim i as Integer, max as Integer Dim a(1 to 10) as Integer
‘代码略,随机产生 10 个不重复的数存于数组 a 的 10 个元素 a(1)~a(10)中max=a(1)
For i=2 to 10
If a(i)>a(max) then max=i Next i
变量 max 用于存储( )
s = 0
For i = 1 To 30
If i Mod 5 = 0 Then
s = s + i
i = i + 6
End If
Next i
运行后,变量s的值是( )
a=1
b=a+1
print(a,b)
①s[:4] ②s[-5:-1] ③s[:2]+s[3]*2 ④s[0:2]+s[3:5]
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个划线处的表达式分别为( )
试题篮