文件操作

fr = open('ccc.txt',mode='r',encoding='utf-8')
plaincode = fr.read()
print('明文:' + plaincode)

print('密文:',end='')
for c in plaincode:
    print(chr(ord(c)+3),end='')

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()

文件操作_第1张图片

你可能感兴趣的:(文件操作)