凯撒密码b

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

posted @ 2020-03-23 21:12  Xiao_kong  阅读(167)  评论(0编辑  收藏  举报