试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省桐乡市茅盾中学2015-2016学年高一下学期期中考试信息技术试题
IJKLMNOPQRSTUVWXYZ”,转换成5行的“N”字形排列如图所示:
小张根据排列规律设计了“N”字形排列显示的VB程序,功能如下:在文本框Text1中输入原字符串,在文本框Text2中输入“N”字形的行数row(row大于等于3).单击“转换”按钮Command1后,将字符串沿“N”字形排列显示在列表框List1中。程序运行如图所示。
Dim a(1 To 15) As Integer
Private Sub Form_Load()
Dim i As Integer, t As Integer
Dim s1 As String, s2 As String
Randomize
s1 = ""
For i = 1 To 15
a(i) = ①
s1 = s1 + Str(a(i))
Next i
Text1.Text = s1
End Sub
Private Sub Com1_Click()
s2 = ""
s2 = ②
Text2.Text = s2
def bin(n):
if n==0:
return
else:
bin(n//2)
print(n%2,end='')
bin(13)
试题篮