level 12
刘扑通º
楼主
import string
a=input("输入待加密文本:")
count=len(a)
c=''
num=0
test=0 #判断变量
while (count>0):
count=count-1
b=ord(a[num])
if b>=65 and b<=86 or b>=97 and b<=118:
b=b+4
elif b>=87 and b<=90 or b>=119 and b<=122:
b=b-22
else:
test=1
break
num=num+1
b=chr(b)
c=c+b
if test==0:
print(c)
else:
print("无法加密,naive!")
2017年03月23日 01点03分
1
a=input("输入待加密文本:")
count=len(a)
c=''
num=0
test=0 #判断变量
while (count>0):
count=count-1
b=ord(a[num])
if b>=65 and b<=86 or b>=97 and b<=118:
b=b+4
elif b>=87 and b<=90 or b>=119 and b<=122:
b=b-22
else:
test=1
break
num=num+1
b=chr(b)
c=c+b
if test==0:
print(c)
else:
print("无法加密,naive!")