试题 试卷
题型:判断题 题类:模拟题 难易度:容易
新疆昌吉回族自治州第一中学2020-2021学年高三学业水平信息技术模拟测试卷
que=[""]*20
head,tail= 0,0
for i in range(3):
que[tail]=chr(97+i)
tail+= 1
st=["b","c","d","a"]
top=3
while head < tail and top > - 1:
if st[top]==que[head]:
head+= 1
else:
que[tail] = st[top]
top-= 1
print(que[head:tail])
执行该程序段,则输出的结果是( )
import random
q=[0]*8 ; head,tail=0,4
for i in range(4):
k=random.randint(0,10)
if k%2==0:
q[tail]=k%5
tail+=1
head+=1
while head<tail:
print(q[head],end=" ")
程序运行后,输出结果可能为( )
试题篮