生活中,一直有烦人的人偷看信息,所以我们可以把信息加密解密!
加密程序
text = input('')
s = ""
i=0
while i < len (text):c=text[i]if 'a' <= c <= 'w' or 'A' <= c <= 'W':c = chr(ord(c)+3)elif'x' <= c <= 'z' or 'X'<= c <= 'Z':c=chr(ord(c)-23)s=s+ci=i+1print('text:'+s)
把加密的东西解密 解密程序
text = input()
s = ""
i = 0
while i < len(text):c = text[i]if 'd' <= c <= 'z' or 'D' <= c <= 'Z':c = chr(ord(c)-3)elif'a' <= c <= 'c' or 'A' <= c <= 'C':c = chr(ord(c)+23)s = s+ci = i+1
print('text:'+s)