试题 试卷
题型:单选题 题类: 难易度:容易
新疆伊犁哈萨克自治州霍城县2023-2024学年高一上学期信息技术10月月考试卷
Dim s As String, ch As String
Dim i As Integer, cnt As Integer, sum As Integer, num As Integer
Dim ave As Single
s=Text1.Text:num=0:ch="":cnt=0:sum=0
For i =1 To len(s)
ch = Mid(s, i, 1)
If ⑴ Then
cnt=cnt+1
Else
If cnt>0 Then
num=num+1
⑵
⑶
End If
Next i
ave=sum/num
Label1. Caption =“总共有”+ Str(num) +“个单词,平均长度为:”+ Str (ave)
划线处可选代码为:
①sum = sum + cnt
②sum = sum + num
③cnt = 0
④cnt = 1
⑤Not(ch =””Or ch = “.”)
⑥ch>=“a” And ch<=“z” or ch>=“A”And ch<=“Z”
⑴、⑵、⑶处语句分别为( )
n= 5
head=0
tail=4
que=['a' , 'b' ,'c' ,'d' ,'e' ]
while head!=tail:
if head%4==0:
print (que[head])
else:
tail=(tail+1)%n
que[tail]=que[head]
head= (head+1)%n
比如:仓库存储情况列表a=["0","A","A","B","B","A","0","0","0"],其中"0"表示空位,"A","B"表示位置上货物种类,现需从中取出一件B货物,则应从右侧取出,取完后,仓库存储列表更新为a=["0","A","A","B","A","0","0","0","0"]。
for i in :
print("*", end="")
试题篮