试题 试卷
题型:单选题 题类: 难易度:普通
江苏省普通高中学业水平合格性考试信息技术模拟卷(五)
for i in range(X):
print(i)
s = Text1.Text
ans = "": k =4
i = k - 1: j = k + 1: n = Len(s)
Do While k > 0
If Mid(s ,i,1) = Mid(s, j, 1) Then
ans = ans + Mid(s, i,1): k = k - 1
End If
i = (n + i - 2) Mod n + 1
j = j Mod n+1
Loop
Label1.Caption=ans
在文本框Text1中输入“banana”,执行程序后,标签Label1中显示的内容是( )
count = 0
For i = 1 To 20
a(i) = Int(Rnd ∗ 100) + 1
Next i
For i = 1 To 100
If b(i) <> 0 Then count = count + 1
Label1.Caption= "不重复数字个数" + Str(count)
为实现上述功能,则程序①处应填入的语句为( )
图 a
num = input("请输入数字串:")
c = 0
⑴
for i in range(1,len(num)):
if ⑵ and f == False:
f = True
elif ⑶ and f == True:
c = c + 1
f = False
print("该数字串中有", c, "个拐点")
方框(1)(2)(3)的代码由以下部分组成:
①f = True ②f = False ③num[i-1] > num[i] ④num[i-1] < num[i]
下列选项中代码顺序正确的是( )
a=[30,10,20,11,12,50]
d=[0]*6 ; max=0 ; n=len(a)
for i in range(1,n):
for j in range(i):
if a[j]<a[i]:
d[i]+=1
if d[i]>max:
max=d[i]
执行程序后,变量max的值是( )
试题篮