试题 试卷
题型:单选题 题类:模拟题 难易度:普通
浙江省绍兴市上虞区2020届高三下学期信息技术第二次教学质量调测卷
Do While i<=6
a(i)=Int(Rnd*5)+1
If a(i) Mod 2<>i Mod 2 Then
i=i-1
ElseIf a(i)<a(i-1) Then
a(i)=a(i)*2
End If
i=i+1
Loop
执行该程序段后,数组元素a(1)到a(6)的值可能是( )
Dim a(1 To 5) As Integer
a(1) = 1
For i = 2 To 5
a(i) = Int(Rnd * 5) + 1
If a(i) Mod 2 = 0 Then
a(i) = a(i) + i
Else
a(i) = a(i) + a(i - 1)
Next i
a(1)~a(5)的值不可能的是( )
Dim S, i As Integer
S=0
For i=1 To 100
S=S+i
Print "S="&S
a=1
b=0
while a<101:
b=b+a
a=a+1
print(b)
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]
下列选项中代码顺序正确的是( )
from random import randint
s=["C++","Java","VB","Pascal","C","Python"]
for i in range(2):
k=randint(0,2)*2
s=s[:k]+s[k+1:]
print(s)
执行该程序段后,变量s的值不可能是( )
import random
a=[0]*6
for i in range(6):
a[i]=random.randint(1,10) #随机生成 1到 10范围内的整数
for i in range(5):
if i%2==0 and a[i]>a[i+1]:
a[i],a[i+1]=a[i+1],a[i]
else:
a[i]+=1
print(a)
执行该程序段后,a的值可能的是( )
试题篮