组卷题库 > 高中信息技术试卷库
试题详情
某加密程序的代码如下:

def encrypt(code, key):

code_new = ''

for i in range(len(code)):

  code_new = code[(i+key)%len(code)] + code_new

  return code_new

  code = input('请输入加密字符串:')

  key = int(input('请输入偏移位数:'))

print(encrypt(code, key))

当输入“Python”和“3”后,程序输出的结果是 (    )

A、 mvqelk
B、  sbwkrq
C、   honPyt
D、  tyPnoh
知识点
参考答案
采纳过本试题的试卷
教育网站链接