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])
else:
ch= s [i]+ch
print(ch)
该程序运行后,输出的结果是( )
def judge(a, b):
n=len(a) ;st=[- 1]*n
top-= 1; i=j=0
while i<n:
top+= 1
①
i+= 1
while top> - 1 and ② :
top-= 1
j+= 1
return top==- 1
from random import shuffle
a=[1,2,3,4, 5]
b=[1,2, 3, 4, 5]
shuffle (b) #将序列 b 的元素随机排序
if judge(a, b):
print (b,'是' ,a,' 的出栈序列')
else:
print (b,'不是' ,a,' 的出栈序列')
程序运行结果如图所示。划线处应填写的语句是( )