试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省绍兴市海亮高级中学2020-2021学年高一下学期信息技术期中考试试卷
a=[3,7,2,5,8,9,4,6,1]
m, c=1, 1
for i in range(1,len(a)):
if a[i]>=a[i-1]:
c+=1
m=max(m, c)
else:
c=1
程序执行后,c和m的值分别是( )
Private Sub Command1_Click()
Dim a As Integer
Dim b As Boolean
a = (a + 1) * 2
b = a - 1
print a:print b
End Sub
程序运行时,单击命令按钮Command1后,变量a和b的值分别是( )
Dim a As Integer,b As Integer
a=10 ‘①
b=20 ‘②
Text1.Text=“a+b=”+Val(a+b) ‘③
End Sub ‘④
发生“类型不匹配”错误时所执行的语句是( )
i = 0: flag = False
Do While i <= 9 And Not flag
For j = 0 To 9
flag = True
Exit For
End If
Next j
i = i + 1
Loop
方框中的代码由以下三部分组成:
①If s Mod 12 = 0 And s Mod 37= 0 Then
②s = 3 * 1000 + i * 100 + 9 * 10 + j
③Text1.Text = Str(i) + Str(j)
下列选项中代码顺序正确的是( )
s=1
for i in range(_):
s=s+i print(s)
from random import random
a=[1]*5
i=1
while i<=4:
a[i]=int(random()*10)+1
if a[i]==a[i-1]//2 or a[i]==a[i-1]*2:
i+=1
执行该程序段后,数组a的值可能是( )
试题篮