因为在实现凯撒密码时,每个字母都往后移了4位,而不是每个字母往后移动一个固定的距离。所以正确的输出应该是“M ampp evvmzi ex 14 s'gpsgo”,即每个字母往后移动14位。

def caesar_ciphertext result = for char in text if charisalpha # 获取字符编码值 char_code = ordchar # 如果是大写字母 if charisupper # 替换为后面第4

原文地址: https://www.cveoy.top/t/topic/Ofv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录