试题 试卷
题型:单选题 题类: 难易度:普通
浙江省嘉兴市八校2023-2024学年高二下学期信息技术期中考试试卷
p ="Tel-114"
c=""
for ch in p:
if ch>= "0" and ch<= "9":
c+=str(9-int(ch))
elif ch>= "a" and ch<= "z":
ch= chr(ord(ch) - 32)
if ch>= "A" and ch<= "Z":
c=ch+c
print(c)
执行程序后,输出的结果为( )
a=[["迎客松" , 21, 2],["激流勇进" , 40, 2],[" 天空栈道" , 50, 5],["一线天" , 30, 4],[" 飞来 峰" , 60, 5],["天梯" , 20, -1]]
head=[0, 1, 3]
for i in range(len(head)):
⑴
s=a[p][1]
while a[p][2]! =-1:
print(a[p][0], end="-->")
⑵
⑶
print(a[p][0])
print("预计时间:" , s , "分钟")
上述程序划线处的可选代码有:
①p=head ②p=head[i] ③s=s+a[p][1] ④p=a[p][2]
则(1),(2),(3)处代码依次为:( )
p = "Call-168"
c = " "
if ch >= "0" and ch <= "9":
c += str(9-int(ch))
elif ch >= "a" and ch <= "z":
c += chr(ord(ch) - ord("a")+ord("A"))
else:
c += ch
程序运行后,输出的结果是( )
试题篮