凯撒密码B

s = input()
t = ""
for c in s:
if 'a' <= c <= 'z':
t += chr( ord('a') + ((ord(c)-ord('a')) + 3 )%26 )
elif 'A'<=c<='Z':
t += chr( ord('A') + ((ord(c)-ord('A')) + 3 )%26 )
else:
t += c
print(t)

posted @ 2020-03-22 21:09  yabaodamowang  阅读(289)  评论(0)    收藏  举报