## 第一题:
第一关地址:[http://www.pythonchallenge.com/pc/def/map.html](http://www.pythonchallenge.com/pc/def/map.html)
![](https://img.kancloud.cn/7d/f0/7df0ece81606e78b8cb9ecf0f41d291e_689x630.png)
```
from os.path import join
old_text = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
#old_text = "xyz"
new_text = list(old_text)
str_str = '' # 中间转换用的单个字符串
str_int = 0 # 中间转换用的ascii码值
for i in range(len(old_text)):
print(old_text[i]) # 将拆分后的每一个字符转换为acdii码值
if 97 <= ord(old_text[i]) <= 122: # a = 97,z = 122
str_int = ord(old_text[i]) + 2
if str_int > 122:
str_int -= 26 # 122-97 = 25 ,+1 = 26
str_str = chr(str_int)
new_text[i] = str_str
print(''.join(new_text))
```