选择题 0.65 引用1 组卷54
某加密程序的代码如下:
str1 = input("请输入明文:")
num = "1358821604"
str2 = " "
for ch in strl:
运行该程序,输入str1的值为“I-520-Python”,则输出结果为( )
str1 = input("请输入明文:")
num = "1358821604"
str2 = " "
for ch in strl:
if "0" <= ch <= "9":
str2 += num[int(ch)]
elif "a" <= ch <= "z":
str2 += chr((ord(ch) - ord("a") + 2) % 26 + ord("a"))
else:
str2 += ch
print(str2)运行该程序,输入str1的值为“I-520-Python”,则输出结果为( )
A.G-831-Ravjqp | B.G-831-Nwrfml | C.I-251-Pwrfml | D.I-251-Pavjqp |
23-24高一下·浙江·期中