试题 试卷
题型:单选题 题类:常考题 难易度:普通
【bj】高中信息技术综合库——面向对象程序设计 VB开发工具
s="ABCDEFGH"
i=1
Do While i<=Len(s)
If i mod 2=0 then
s=mid(s, i+1, len(s)-i) & mid(s, 1, i-1)
End If
i=i+1
Loop
Text1.text=s
a=2
b=5
If a<b Then
m=a
Else
m=b
该程序段运行后,变量m的值为( )。
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.ConnectionString="provider=Microsoft.ACE.OLEDB.12.0;data sourc="
+App.Path+"\socre.accdb"
Conn.Open
Set rs.ActiveConnection=conn
Rs. Open"Selec*from cj"
n=1
Do While Not rs.EOF
Score(n)=rs.fields("成绩"):Name(n)=rs.fields("姓名")
n=n+1:rs.MoveNext
下列说法中不正确的是( )
Private Sub Form_Click()
Dim arr(1 to 10, 1 to 10) As Integer
Dim i As Integer, j As Integer
For i =2 To 4
For j = 2 To 4
arr(i, j) = i * j
Next j
Next i
Label1.Caption =str(arr(2, 2)+ arr(3, 3))
End Sub
s = "A-b2c " ; ch = ""
list=[4 , 3 , 1 , 5 ,2]
for i in range(1en( s)):
if "A " <= s [i] <= "Z " :
ch = ch + chr (ord(s [i]) + list[i])
elif "a " <= s [i] <= "z " :
ch = ch + chr (ord(s [i]) - list[i])
else:
ch= s [i]+ch
print(ch)
该程序运行后,输出的结果是( )
①16/len("ab")**2
②abs(round(-1.7)*2)%8
③chr(ord("0")+4)
④int(str(1010+90)[1:4])//25
试题篮