试题 试卷
题型:单选题 题类:常考题 难易度:普通
【gb】浙江省精诚联盟2020-2021学年高三上学期信息技术12月适应性联考试卷
c = 0: k = 1
For i = 2 To 8
If i Mod 2 = 0 And a(k) > a(i) Then
k = i
c = c + 1
End If
Next i
数组元素a(1)到a(8)的值依次为“16,8,18,3,12,9,15,2”,执行该程序段后,变量k和c的值为( )
x=3
if x%2==0:
print(x,“是偶数。”)
else:
print(x,“是奇数。”)
from microbit import *
while True:
if button_a.is_pressed():
display.show(Image.HAPPY)
elif button_b.is_pressed():
break
display.show(Image.SAD)
sleep(1000)
在micro:bit硬件支持下,以下说法正确的是 ( )
Dim i As Integer, j As Integer, s As Integer, n As Integer
n = 3: s = 0
For i = 1 To n
For j = 1 To i
s = s + j
Next j
Text1.Text = s
End Sub
该程序运行后在文本框Text1 中显示的结果是( )
def fun(x, i):
if x<i:
return i
elif x%i==0:
return x
return fun(x-i, i+1)
执行语句k=fun(37, 3)后,k的值为( )
试题篮