浙江省湖州、衢州、丽水三地市2020届高三上学期信息技术11月教学质量检测试卷
年级: 学科:信息技术(信息科技) 类型: 来源:91题库
一、选择题(本大题共12小题;每小题2分,共24分。) (共12小题)
则下列说法正确的是( )
下列说法正确的是( )
s=0
For k =3 To 1 Step-1
If k <=1 Then x=1
If k <=2 Then x=2
If k <=3 Then x=3
s=s+x
Next k
Text1. Text= Str(s)
该程序段运行后,文本框Text1中显示的内容是( )
m1=1:m2=n
Do While m1< m2
For i=m2 To m1+1 Step -1
If a(i)( a(i-1)Then t= a(i): a(i)=a(i-1): a(i-1)=t
Next i
①
If a(i)> a(i +1). Then t= a(i): a(i)=a(i+1): a(i+1)=t
Next i
m1=m1+1
m2=m2-1
Loop
要使程序实现上述算法思想,则代码中①处的语句是( )
min=100:x=0
Do While x < =16
d1=Sqr(9+(x-4)*(x-4))
d2=Sqr(36+(16-x)*(16-x))
If d1+d2<min Then min=d1+d2
x=x+0.1
Loop
Text1.Text=St(min)
该程序段运行后,文本框Text1中显示的内容是( )
a(1)=1:a(2)=2:a(3)=3:a(4)=3:a(5)=1
n=5:k=3
L=3:R=10 ‘L值可以为数组元素最大值,R可以为数组所有元素和
Do While L+1<R
m=(L+R)\2
t=0:s=0
For i=1 To n
If t+a(i)>=m Then
s=s+1
t =a(i)
Else
t =t+a(i)
End If
Next i
If t>0 then s=s+1
If s<=k Then① Else ②
Loop
Label1.Caption=“最小值为”&Str(L)
要使程序实现上述算法思想,则代码中①②处应为( )
二、非选择题(本大题共4小题,4+8+7+7,共26分) (共4小题)
请回答下列问题:
第二步设置筛选条件选出符合条件的所有学生。若对“选科1”“选科2”、“选科3”同时设置“ ”筛选条件, (选填:能/不能)筛选出正确的结果。
●小球落在孔上,入孔:
●垂直落在平板上,停下;
●落在左滑坡向左滚动,右滑坡向右滚动。若遇平板继续滚动,遇孔则入孔;遇隔板或滑坡则停下;或超出边界;
●落在隔板上,可能向左或向右滑落,概率分别为50%。滑落后运动规律与左右滑坡相同。
假设两个隔板不相邻且左右滑坡总是以“八”出现。小球入孔或超出边界则消失,记消失的概率为100%;小球若停下,记消失的概率为0。
如图a所示,小球随机落下,最终消失的平均概率计算过程如下:
(100%+100%+100%+0.5*(100%+0)+0+0+100%+100%+0.5*(100%+100%)+100%)/10=75%
编写VB程序求解小球消失的概率,程序运行界面如图b所示,代码如下,请回答下列问题:
Dim s As string
Dim prob As single
Private Sub Command1 Click()
Dim i As Integer, c As string
s Text1 Text
prob =0
For i =1 To Len(s)
c= Mid(s, i, 1)
If c=“.” Then
prob= prob +100
ElseIf c =“/”Then
prob= prob slope(i, True)
ElseIf c=“\” Then
prob prob+ slope(i, False)
ElseIf c=“|” Then
prob =prob+
End If
Next i
Text2 Text= Str(prob Len(s))
End sub
Function slope(k As Integer, flag As Boolean)As Single
Dim c As string
If flag Then
For j=
c= Mid(s, j, 1)
If c =“.” Then slope =100: Exit For
If c=“|” Or c=“\”Then slope =0: Exit For
Next j
If j< 1 Then slope =100
Else
For j=k+ 1 To Len (s)
c= Mid(s, j, 1)
If c=“.”Then slope =100: Exit For
If c=“|” Or c=“/” Then slope =0: Exit For
Next j
If j>Len(s) Then slope =100
End If
End Function

程序实现过程:生成规模为n×m的网格,在网格边界添加一圈交通锥“▲”,并将“□” “●”、“▲”按行依次存入数组a中,在文本框Tex3中输入停放该车最小长度clen值,在文本框Text4中输出共有多少种停放方法。程序运行界面如图b所示,实现上述功能的VB代码如下:
Dim a(1 To 200) As String
Dim n as Integer, m As Integer
Private Sub Command1 Click ()
Dim i As Integer, j As Integer, k As Integer
Dim s As string
n= Val(Text1. Text)+2
m=Val(Text2 Text)+2
List1. Clear
For i=1 To n*m
If i<=m0ri>m*(n-1) or ① Then ‘在矩阵周围加上一圈边界
a(i)=“▲”
Else
k= Int(Rnd 2)
If k=1 Then a(i)=“□” Else a(i)=“●”
End If
Next i
‘在列表框List1中显示网格,代码略
End sub
Private Sub Command2 Click ()
Dim i As Integer, j As Integer, c As Integer, x As Integer, y As Integer
Dim cnt As Integer, clen As Integer
Dim flag As boolean
clen= Val(Text3. Text)
y=1
Do While y <=m
For x =1 To n
If a((x-1)*m+ y)=“□” Then
c=c+1
Else
If c ≥=clen Then
cnt=②
End if
③
End If
Next x
y=y+1
Loop
Text4 Text Str(cnt)
End Sub
请回答下列问题
① ② ③