fr = open('salah.txt', mode='r', encoding='utf-8')
plaincode=fr.read()
print('明文:'+plaincode)
print('密文:',end='')
for c in plaincode:
print(chr(ord(c)+3),end='')
![](https://i-blog.csdnimg.cn/blog_migrate/835df599dcdeed7505efac4e1ccc87b5.png)
fr = open('salah.txt',mode='r',encoding='utf-8')
plaincode = fr.read()
fr.close
fw = open('s alah.txt',mode='a',encoding='utf-8')
for c in plaincode:
fw.write(chr(ord(c)+3))
fw.close
import turtle
colors=['yellow','red','black','blue','purple','orange']
turtle.speed(10)
for i in range(100):
turtle.pencolor(colors[i%6])
turtle.forward(i)
turtle.left(59)
turtle.done()
![](https://i-blog.csdnimg.cn/blog_migrate/9f15459ce04a909dd65166de218a51bc.png)