试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省高中信息技术 算法的基本概念及常用表示方法同步练习
For i = 1 To Len(Text1.Text)
c = Mid(Text1.Text, i, 1)
If c >= "0" And c <= "9" Then c = Chr(Asc(c) + 1)
If c >= "A" And c <= "Z" Then c = Chr(Asc(c) + 32)
s =s + c
Next i
若文本框Text1的内容为“Number 2468!”执行程序后,变量s的值为( )
Private Sub Command1_Click()
Dim s As String, a As String, t As String
s = Text1.Text: t = ""
For i = 1 To Len(s)
a = Mid(s, i, 1)
If a >= "0" And a <= "9" Then
t = t + a
ElseIf a = "!" Then
t = ""
ElseIf t <> "" Then
List1.AddItem t
End If
End Sub
在文本框Text1中输入“12+23=35!456Ye”,单击按钮“Command1”后,在列表框List1中显示的结果是( )
s = "2019Nian12yue3Ri"
For i = Len(s)-1 To 1 step -1
If Mid(s, i, 1) <= "9" And Mid(s, i + 1, 1) >= "A" Then
sum= sum+ Val(Mid(s, i, 1))
运行程序后,变量sum 的值是( )
mw = input('请输入:')
res=''
i=0; j=0; n=len(mw)
while j<n:
if i%2==0:
mw+=mw[i]
else:
res+=mw[i]
j+=1
i+=1
print(res)
若输入的内容为python,输出的结果为( )
试题篮