python第二节课10题

python第二节课10题

 

 

#字母反码
data1=input("")
for i in data1:
if "a"<=i<="m":
print(chr(ord("z")-(ord(i)-ord("a"))),end="")
elif "n"<=i<="z":
print(chr(ord("a")-(ord(i)-ord("z"))),end="")
elif "A"<=i<="M":
print(chr(ord("Z")-(ord(i)-ord("A"))),end="")
elif "N"<=i<="Z":
print(chr(ord("A")-(ord(i)-ord("Z"))),end="")
else:
print(i,end="")

print("\n3009")

上一篇:yield vs yield from


下一篇:筛选分数等级