测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A18622. 以下程序实现了一种简单的“翻转”加密:将大写字母表中的每个字母替换为与其对称的字母( A ↔ Z 、B ↔ Y 、 C ↔ X 、……)。横线处填写的代码是?( )text = "HELLO" result = [] for ch in text: if 'A' <= ch <= 'Z': _________ result.append(new_ch) else: result.append(c…

单选题 中等

题目描述

以下程序实现了一种简单的“翻转”加密:将大写字母表中的每个字母替换为与其对称的字母( A ↔ Z 、B ↔ Y 、 C ↔ X 、……)。横线处填写的代码是?(    )

text = "HELLO"
result = []
for ch in text:
    if 'A' <= ch <= 'Z':
        _________
        result.append(new_ch)
    else:
        result.append(ch)
encrypted = ''.join(result)
print(encrypted)

选项(单选)

上一题 下一题