标签:write png span code 技术 open letter 文件 python
fr = open(‘letter.txt.txt‘, mode=‘r‘, encoding=‘utf-8‘)
plaincode = fr.read() print(‘明文:‘ + plaincode) print(‘密文:‘, end=‘‘) for c in plaincode: print(chr(ord(c)+3),end=‘‘)
明文:一小时后行动。 密文:"七尒旹向衏劫々
fr = open(‘letter.txt.txt‘, mode=‘r‘, encoding=‘utf-8‘) plaincode = fr.read() fr.close() fw = open(‘c_letter.txt.txt‘, mode=‘a‘, encoding=‘utf-8‘) for c in plaincode: fw.write(chr(ord(c)+3)) fw.close()
"七尒旹向衏劫々
fr = open(‘c_letter.txt.txt‘, mode=‘r‘, encoding=‘utf-8‘) plaincode = fr.read() fr.close() fw = open(‘letter.txt.txt‘, mode=‘a‘, encoding=‘utf-8‘) for c in plaincode: fw.write(chr(ord(c)-3)) fw.close()
一小时后行动。一小时后行动。
import turtle turtle.speed(10) colors = [‘#FF00FF‘,‘#EE9A00‘,‘#CD0000 ‘,‘#AEEEEE‘,‘#98FB98‘,‘#388E8E‘] for i in range(100): turtle.pencolor(colors[i% 6]) turtle.forward(i) turtle.left(59) turtle.done()
标签:write png span code 技术 open letter 文件 python
原文地址:https://www.cnblogs.com/Millie/p/9113622.html