试题 试卷
题型:单选题 题类: 难易度:普通
浙江省嘉兴市2023年9月高三信息技术模拟检测卷
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
x=1
y=4
Do While y>4
x=x * y
y=y+1
Loop
Print x
s=0
For i=1 To 3
s=s+i
Next i
该程序段运行后,变量s的值是( )
flag=False:s="ShanShui2020!"
For i=1 To Len(s)
ch=Mid(s,i,1)
If Not(ch〉="0"And ch<="9")And Not flag Then
t=ch+t
End If
flag=Not flag
Text1.Text=t
执行完以上程序段后,文本框text1中的内容为( )
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])
ch= s [i]+ch
print(ch)
该程序运行后,输出的结果是( )
n = int(input())
a,b,num = 2,1,2
for i in range(n-1):
print(num)
方框中的代码由以下三部分组成:①num += a / b ②a = a + b ③b = a - b代码顺序正确的选项是( )
试题篮