试题 试卷
题型:单选题 题类:常考题 难易度:普通
粤教版(2019)必修一4.4 运用循环结构描述问题求解过程
s = ①
n = 1
while ②:
s =③
n+=2
print(n-2)
s=1
for i in range(1,5):
s=s*i
print(s,i)
该程序段运行后,结果为( )
s="Good-Luck-2023!"
n=0;m=0;k=0
for i in range(len(s)):
ch=s[i]
if ch>="0" and ch<="9":
m=m+1
elif ch>="a" and ch<="z":
n=n+1
else:
k=k+1
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)
执行程序后,输出的结果为( )
试题篮